Skip to contentSkip to conversation

megaraid: Use the proper type to hold the irq number.

PATCH New [email protected] 1 participant 1 message Aug 15, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 19/24 megaraid: Use the proper type to hold the irq number.

From: Eric W. Biederman <[email protected]>

When testing on a Unisys machine it was discovered that the megaraid driver would not initialize as it was requesting irq 162 instead of irq 1442 it was assigned. The problem was the irq number had been truncated by being stored in an unsigned char.

This patches fixes that problem and the driver now appears to work.

The ioctl interface appears fundamentally broken as it exports the irq number to user space in an unsigned char.

---

 drivers/scsi/megaraid/mega_common.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/megaraid/mega_common.h renamed from drivers/scsi/megaraid/mega_common.h~megaraid-use-the-proper-type-to-hold-the-irq-number +1 -1
diff -puN drivers/scsi/megaraid/mega_common.h~megaraid-use-the-proper-type-to-hold-the-irq-number drivers/scsi/megaraid/mega_common.h
@@ -175,7 +175,7 @@ typedef struct {
 	uint8_t			max_lun;
 
 	uint32_t		unique_id;
-	uint8_t			irq;
+	int			irq;
 	uint8_t			ito;
 	caddr_t			ibuf;
 	dma_addr_t		ibuf_dma_h;

_