ARECA 'arcmsr' new Linux SCSI RAID driver version 1.20.00.10
A message that is not in the archive (sent off-list or not yet received): 001a01c5c286$333a9290$9300a8c0@erich2003
Quoted 5 lines · erich
Hi Dear All,
I have add some sysfs function at arcmsr.
increase some ioctl function for the request of Linux forums and areca customer.
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("Dual BSD/GPL");
+#endif
that ifdef is not needed and should go away!
+#ifndef msleep
+#define arc_mdelay(msec) mdelay(msec)
+#define arc_mdelay_int(msec) mdelay(msec)
+#else
+#define arc_mdelay(msec) msleep(msec)
+#define arc_mdelay_int(msec) msleep_interruptible(msec)
+#endif
please don't do a pointless abstraction like this. If you want to protect against ancient kernel versions, you should provide an msleep() emulation in some compat header. Not define a new name!
(and your emulation is really bad as well in this case and very broken)
+ if (sizeof(dma_addr_t) > 4) {
+ if (!pci_set_dma_mask(pPCI_DEV, DMA_64BIT_MASK))
{ /*64bit */
+ printk
+ ("ARECA RAID: 64BITS PCI BUS DMA ADDRESSING
SUPPORTED 'USING DAC'\n");
+ } else {
+ printk
+ ("ARECA RAID: 32BITS PCI BUS DMA ADDRESSING
'DAC DISABLE'\n");
+ pci_set_dma_mask(pPCI_DEV, DMA_32BIT_MASK);
+ }
+ } else {
+ pci_set_dma_mask(pPCI_DEV, DMA_32BIT_MASK);
+ }
this code makes no sense; at least the if (sizeof()) doesn't
there are also many coding style issues making it hard to review this driver ;(