Re: [PATCH 4/11] qla2xxx: Add MBX command routines for ISP24xx support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +//ISP24xx

C++ comments again.

>  	/* Load mailbox registers. */
> -	optr = (uint16_t __iomem *)MAILBOX_REG(ha, reg, 0);
> +	if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) {
> +		reg24 = (struct device_reg_24xx __iomem *)ha->iobase;
> +		optr = (uint16_t __iomem *)&reg24->mailbox0;
> +	} else {
> +		reg = ha->iobase;
> +		optr = (uint16_t __iomem *)MAILBOX_REG(ha, reg, 0);
> +	}

Looking over the patches you have things like this a lot, and it's ugly
as hell.  There must be a nicer way to get all this sorted out.
As a start make the ha->iobase and union of the both different register
laouts, dito for the reg variable in all the functions, then make sure
MAILBOX_REG & co work for the 24xx and 25xx aswell.

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux