Skip to contentSkip to conversation

dc395x - description

PATCH New Jamie Lenehan 3 participants 11 messages Aug 3, 2003 – Aug 12, 2003

Subsystems (2)
lore
Share & tools
lore

Jamie Lenehan

author maintainer
#0 lore raw

PATCH 1/1 dc395x - description

A few updates for the dc395x driver.
Patches against 2.6.0-test2-bk2

01-remove-static-eeprom-struct.patch:

Move the eeprom details from a static struct indexed by adapter number into the adapter information block of the adapter. This removes the fixed size static array and removes the need to count the number of adapters.

02-remove-static-adapter-list.patch:

Remove the static list of adapters and the code related to keeping this up to date. The only remaining use for the static list was for the proc info function to find the scsi_host, but that's passed as a parameter anyway.

03-fix-failures.patch:

Handle the case where scsi_add_host fails and update the removal function to correctly unregister everything.

Signature · 2 lines
 Jamie Lenehan              Work Phone: +61 3 9843 8817
 [email protected]        Work Email: [email protected]
author maintainer
#1 lore raw

PATCH 1/1 dc395x - 1/3 remove-static-eeprom-struct

Move the eeprom details from a static struct indexed by adapter number into the adapter information block of the adapter. This removes the fixed size static array and removes the need to count the number of adapters.

drivers/scsi/dc395x.c +83 -110
diff -r -du a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
@@ -264,6 +264,44 @@
 };
 
 
+/*
+ * The SEEPROM structure for TRM_S1040 
+ */
+struct NVRamTarget {
+	u8 cfg0;		/* Target configuration byte 0  */
+	u8 period;		/* Target period                */
+	u8 cfg2;		/* Target configuration byte 2  */
+	u8 cfg3;		/* Target configuration byte 3  */
+};
+
+
+struct NvRamType {
+	u8 sub_vendor_id[2];	/* 0,1  Sub Vendor ID   */
+	u8 sub_sys_id[2];	/* 2,3  Sub System ID   */
+	u8 sub_class;		/* 4    Sub Class       */
+	u8 vendor_id[2];	/* 5,6  Vendor ID       */
+	u8 device_id[2];	/* 7,8  Device ID       */
+	u8 reserved;		/* 9    Reserved        */
+	struct NVRamTarget target[DC395x_MAX_SCSI_ID];
+						/** 10,11,12,13
+						 ** 14,15,16,17
+						 ** ....
+						 ** ....
+						 ** 70,71,72,73
+						 */
+	u8 scsi_id;		/* 74 Host Adapter SCSI ID      */
+	u8 channel_cfg;		/* 75 Channel configuration     */
+	u8 delay_time;		/* 76 Power on delay time       */
+	u8 max_tag;		/* 77 Maximum tags              */
+	u8 reserved0;		/* 78  */
+	u8 boot_target;		/* 79  */
+	u8 boot_lun;		/* 80  */
+	u8 reserved1;		/* 81  */
+	u16 reserved2[22];	/* 82,..125 */
+	u16 cksum;		/* 126,127 */
+};
+
+
 /*-----------------------------------------------------------------------
   SCSI Request Block
   -----------------------------------------------------------------------*/
@@ -365,7 +403,6 @@
 	struct timer_list selto_timer;
 
 	u16 srb_count;
-	u16 adapter_index;	/* nth Adapter this driver */
 
 	u8 dcb_count;
 	u8 sel_timeout;
@@ -389,45 +426,11 @@
 
 	struct ScsiReqBlk srb_array[DC395x_MAX_SRB_CNT];
 	struct ScsiReqBlk srb;
-};
 
-
-/*
- * The SEEPROM structure for TRM_S1040 
- */
-struct NVRamTarget {
-	u8 cfg0;		/* Target configuration byte 0  */
-	u8 period;		/* Target period                */
-	u8 cfg2;		/* Target configuration byte 2  */
-	u8 cfg3;		/* Target configuration byte 3  */
+	struct NvRamType eeprom;	/* eeprom settings for this adapter */
 };
 
 
-struct NvRamType {
-	u8 sub_vendor_id[2];	/* 0,1  Sub Vendor ID   */
-	u8 sub_sys_id[2];	/* 2,3  Sub System ID   */
-	u8 sub_class;		/* 4    Sub Class       */
-	u8 vendor_id[2];	/* 5,6  Vendor ID       */
-	u8 device_id[2];	/* 7,8  Device ID       */
-	u8 reserved;		/* 9    Reserved        */
-	struct NVRamTarget target[DC395x_MAX_SCSI_ID];
-						/** 10,11,12,13
-						 ** 14,15,16,17
-						 ** ....
-						 ** ....
-						 ** 70,71,72,73
-						 */
-	u8 scsi_id;		/* 74 Host Adapter SCSI ID      */
-	u8 channel_cfg;		/* 75 Channel configuration     */
-	u8 delay_time;		/* 76 Power on delay time       */
-	u8 max_tag;		/* 77 Maximum tags              */
-	u8 reserved0;		/* 78  */
-	u8 boot_target;		/* 79  */
-	u8 boot_lun;		/* 80  */
-	u8 reserved1;		/* 81  */
-	u16 reserved2[22];	/* 82,..125 */
-	u16 cksum;		/* 126,127 */
-};
 
 
 /*---------------------------------------------------------------------------
@@ -514,7 +517,6 @@
  ---------------------------------------------------------------------------*/
 static struct AdapterCtlBlk *acb_list_head = NULL;
 static struct AdapterCtlBlk *acb_list_tail = NULL;
-static u16 adapter_count = 0;
 static u16 current_sync_offset = 0;
 static char monitor_next_irq = 0;
 
@@ -546,7 +548,6 @@
 	msgin_phase1,	/* phase:7 */
 };
 
-struct NvRamType eeprom_buf[DC395x_MAX_ADAPTER_NUM];
 /*
  *Fast20:	000	 50ns, 20.0 MHz
  *		001	 75ns, 13.3 MHz
@@ -1611,14 +1612,12 @@
  */
 static void reset_dev_param(struct AdapterCtlBlk *acb)
 {
-	struct DeviceCtlBlk *dcb;
+	struct DeviceCtlBlk *dcb = acb->link_dcb;
 	struct DeviceCtlBlk *dcb_temp;
-	struct NvRamType *eeprom;
+	struct NvRamType *eeprom = &acb->eeprom;
 	u8 period_index;
-	u16 index;
 
 	dprintkdbg(DBG_0, "reset_dev_param..............\n");
-	dcb = acb->link_dcb;
 	if (dcb == NULL)
 		return;
 
@@ -1627,8 +1626,6 @@
 		dcb->sync_mode &= ~(SYNC_NEGO_DONE + WIDE_NEGO_DONE);
 		dcb->sync_period = 0;
 		dcb->sync_offset = 0;
-		index = acb->adapter_index;
-		eeprom = &eeprom_buf[index];
 
 		dcb->dev_mode = eeprom->target[dcb->target_id].cfg0;
 		/*dcb->AdpMode = eeprom->channel_cfg; */
@@ -1679,7 +1676,7 @@
 	/* We may be in serious trouble. Wait some seconds */
 	acb->scsi_host->last_reset =
 	    jiffies + 3 * HZ / 2 +
-	    HZ * eeprom_buf[acb->adapter_index].delay_time;
+	    HZ * acb->eeprom.delay_time;
 
 	/*
 	 * re-enable interrupt      
@@ -3832,9 +3829,7 @@
 		/* Suspend queue for a while */
 		acb->scsi_host->last_reset =
 		    jiffies + HZ / 2 +
-		    HZ *
-		    eeprom_buf[acb->adapter_index].
-		    delay_time;
+		    HZ * acb->eeprom.delay_time;
 		clear_fifo(acb, "DiscEx");
 		DC395x_write16(acb, TRM_S1040_SCSI_CONTROL, DO_HWRESELECT);
 		return;
@@ -4640,7 +4635,7 @@
 	/* Maybe we locked up the bus? Then lets wait even longer ... */
 	acb->scsi_host->last_reset =
 	    jiffies + 5 * HZ / 2 +
-	    HZ * eeprom_buf[acb->adapter_index].delay_time;
+	    HZ * acb->eeprom.delay_time;
 
 	clear_fifo(acb, "RstDet");
 	set_basic_config(acb);
@@ -4731,9 +4726,8 @@
 void init_dcb(struct AdapterCtlBlk *acb, struct DeviceCtlBlk **pdcb,
 	      u8 target, u8 lun)
 {
-	struct NvRamType *eeprom;
+	struct NvRamType *eeprom = &acb->eeprom;
 	u8 period_index;
-	u16 index;
 	struct DeviceCtlBlk *dcb;
 	struct DeviceCtlBlk *dcb2;
 
@@ -4771,8 +4765,6 @@
 	dcb->flag = 0;
 	dcb->max_command = 1;
 	/* $$$$$$$ */
-	index = acb->adapter_index;
-	eeprom = &eeprom_buf[index];
 	dcb->dev_mode = eeprom->target[target].cfg0;
 	/*dcb->AdpMode = eeprom->channel_cfg; */
 	dcb->inquiry7 = 0;
@@ -4951,13 +4943,12 @@
  ***********************************************************************
  */
 static
-int __init init_acb(struct Scsi_Host *host, u32 io_port, u8 irq, u16 index)
+int __init init_acb(struct Scsi_Host *host, u32 io_port, u8 irq)
 {
-	struct NvRamType *eeprom;
-	struct AdapterCtlBlk *acb;
+	struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata;
+	struct NvRamType *eeprom = &acb->eeprom;
 	u16 i;
 
-	eeprom = &eeprom_buf[index];
 	host->max_cmd_len = 24;
 	host->can_queue = DC395x_MAX_CMD_QUEUE;
 	host->cmd_per_lun = DC395x_MAX_CMD_PER_LUN;
@@ -4969,7 +4960,6 @@
 	host->irq = irq;
 	host->last_reset = jiffies;
 
-	acb = (struct AdapterCtlBlk *) host->hostdata;
 
 	host->max_id = 16;
 	if (host->max_id - 1 == eeprom->scsi_id)
@@ -4991,7 +4981,6 @@
 	acb->dcb_run_robin = NULL;
 	acb->active_dcb = NULL;
 	acb->srb_count = DC395x_MAX_SRB_CNT;
-	acb->adapter_index = index;
 	acb->scsi_host->this_id = eeprom->scsi_id;
 	acb->hostid_bit = (1 << acb->scsi_host->this_id);
 	/*acb->scsi_host->this_lun = 0; */
@@ -5050,16 +5039,14 @@
  * @host:	This hosts adapter strcuture
  * @io_port:	The base I/O port
  * @irq:	IRQ
- * @index:	Card instance number
  *
  * Returns 0 if the initialization succeeds, any other value on failure.
  **/
 static
-int __init init_adapter(struct Scsi_Host *host, u32 io_port,
-			u8 irq, u16 index)
+int __init init_adapter(struct Scsi_Host *host, u32 io_port, u8 irq)
 {
-	struct NvRamType *eeprom = &eeprom_buf[index];
 	struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata;
+	struct NvRamType *eeprom = &acb->eeprom;
 
 	if (!request_region(io_port, host->n_io_port, DC395X_NAME)) {
 		dprintkl(KERN_ERR, "Failed to reserve IO region 0x%x\n", io_port);
@@ -5106,9 +5093,7 @@
 
 		acb->scsi_host->last_reset =
 		    jiffies + HZ / 2 +
-		    HZ *
-		    eeprom_buf[acb->adapter_index].
-		    delay_time;
+		    HZ * acb->eeprom.delay_time;
 
 		/*spin_lock_irq (&io_request_lock); */
 	}
@@ -5465,22 +5450,22 @@
  * print_eeprom_settings - output the eeprom settings
  * to the kernel log so people can see what they were.
  *
- * @index: Adapter number
+ * @eeprom: The eeprom data strucutre to show details for.
  **/
 static
-void __init print_eeprom_settings(u16 index)
+void __init print_eeprom_settings(struct NvRamType *eeprom)
 {
 	dprintkl(KERN_INFO, "Used settings: AdapterID=%02i, Speed=%i(%02i.%01iMHz), dev_mode=0x%02x\n",
-	       eeprom_buf[index].scsi_id,
-	       eeprom_buf[index].target[0].period,
-	       clock_speed[eeprom_buf[index].target[0].period] / 10,
-	       clock_speed[eeprom_buf[index].target[0].period] % 10,
-	       eeprom_buf[index].target[0].cfg0);
+	       eeprom->scsi_id,
+	       eeprom->target[0].period,
+	       clock_speed[eeprom->target[0].period] / 10,
+	       clock_speed[eeprom->target[0].period] % 10,
+	       eeprom->target[0].cfg0);
 	dprintkl(KERN_INFO, "               AdaptMode=0x%02x, Tags=%i(%02i), DelayReset=%is\n",
-	       eeprom_buf[index].channel_cfg,
-	       eeprom_buf[index].max_tag,
-	       1 << eeprom_buf[index].max_tag,
-	       eeprom_buf[index].delay_time);
+	       eeprom->channel_cfg,
+	       eeprom->max_tag,
+	       1 << eeprom->max_tag,
+	       eeprom->delay_time);
 }
 
 
@@ -5497,39 +5482,27 @@
  */
 static
 struct Scsi_Host *__init host_init(Scsi_Host_Template * host_template,
-				   u32 io_port, u8 irq,
-				   u16 index)
+				   u32 io_port, u8 irq)
 {
 	struct Scsi_Host *host;
 	struct AdapterCtlBlk *acb;
 
-	/*
-	 * Read the eeprom contents info the buffer we supply. Use
-	 * defaults is eeprom checksum is wrong.
-	 */
-	check_eeprom(&eeprom_buf[index], (u16) io_port);
-
-	/*
-	 *$$$$$$$$$$$  MEMORY ALLOCATE FOR ADAPTER CONTROL BLOCK $$$$$$$$$$$$
-	 */
 	host = scsi_host_alloc(host_template, sizeof(struct AdapterCtlBlk));
 	if (!host) {
-		dprintkl(KERN_INFO, "pSH scsi_host_alloc ERROR\n");
-		return 0;
+		dprintkl(KERN_INFO, "scsi_host_alloc failed\n");
+		goto failed;
 	}
- 	print_eeprom_settings(index);
+ 	acb = (struct AdapterCtlBlk *)host->hostdata;
 
- 	acb = (struct AdapterCtlBlk *) host->hostdata;
- 	if (init_acb(host, io_port, irq, index)) {
-		scsi_host_put(host);
-		return 0;
+	check_eeprom(&acb->eeprom, (u16)io_port);
+ 	print_eeprom_settings(&acb->eeprom);
+
+ 	if (init_acb(host, io_port, irq)) {
+		goto failed;
 	}
  	print_config(acb);
 
-       /*
-        *$$$$$$$$$$$$$$$$$ INITIAL ADAPTER $$$$$$$$$$$$$$$$$
-        */
- 	if (!init_adapter(host, io_port, irq, index)) {
+ 	if (!init_adapter(host, io_port, irq)) {
  		if (!acb_list_head) {
  			acb_list_head = acb;
   		} else {
@@ -5539,10 +5512,15 @@
  		acb->next_acb = NULL;
 	} else {
 		dprintkl(KERN_INFO, "DC395x_initAdapter initial ERROR\n");
-		scsi_host_put(host);
-		host = NULL;
+		goto failed;
 	}
+
 	return host;
+
+failed:
+	if (host)
+		scsi_host_put(host);
+	return NULL;
 }
 
 #undef SEARCH
@@ -5607,9 +5585,8 @@
 	DC395x_LOCK_IO(acb->scsi_host, flags);
 
 	SPRINTF("SCSI Host Nr %i, ", shpnt->host_no);
-	SPRINTF("DC395U/UW/F DC315/U %s Adapter Nr %i\n",
-		(acb->config & HCC_WIDE_CARD) ? "Wide" : "",
-		acb->adapter_index);
+	SPRINTF("DC395U/UW/F DC315/U %s\n",
+		(acb->config & HCC_WIDE_CARD) ? "Wide" : "");
 	SPRINTF("IOPortBase 0x%04x, ", acb->IOPortBase);
 	SPRINTF("irq_level 0x%02x, ", acb->irq_level);
 	SPRINTF(" SelTimeout %ims\n", (1638 * acb->sel_timeout) / 1000);
@@ -5621,8 +5598,7 @@
 	/*SPRINTF(", DMA_Status %i\n", DC395x_read8(acb, TRM_S1040_DMA_STATUS)); */
 	SPRINTF(", FilterCfg 0x%02x",
 		DC395x_read8(acb, TRM_S1040_SCSI_CONFIG1));
-	SPRINTF(", DelayReset %is\n",
-		eeprom_buf[acb->adapter_index].delay_time);
+	SPRINTF(", DelayReset %is\n", acb->eeprom.delay_time);
 	/*SPRINTF("\n"); */
 
 	SPRINTF("Nr of DCBs: %i\n", acb->dcb_count);
@@ -5871,7 +5847,7 @@
 	irq = dev->irq;
 	dprintkdbg(DBG_0, "IO_PORT=%04x,IRQ=%x\n", (unsigned int) io_port, irq);
 
-	scsi_host = host_init(&dc395x_driver_template, io_port, irq, adapter_count);
+	scsi_host = host_init(&dc395x_driver_template, io_port, irq);
 	if (!scsi_host)
 	{
 		dprintkdbg(DBG_0, "host_init failed\n");
@@ -5883,9 +5859,6 @@
 	/* store pci devices in out host data object. */
 	((struct AdapterCtlBlk *)(scsi_host->hostdata))->dev = dev;
 
-	/* increment adaptor count */
-	adapter_count++;
-
 	/* store ptr to scsi host in the PCI device structure */
 	pci_set_drvdata(dev, scsi_host);
 
drivers/scsi/dc395x.h +0 -1
diff -r -du a/drivers/scsi/dc395x.h b/drivers/scsi/dc395x.h
@@ -28,7 +28,6 @@
 #define DC395x_MAX_CMD_QUEUE		32
 /* #define DC395x_MAX_QTAGS		32 */
 #define DC395x_MAX_QTAGS		16
-#define DC395x_MAX_ADAPTER_NUM		4
 #define DC395x_MAX_SCSI_ID		16
 #define DC395x_MAX_CMD_PER_LUN		DC395x_MAX_QTAGS
 #define DC395x_MAX_SG_TABLESIZE		64	/* HW limitation			*/
Signature · 2 lines
 Jamie Lenehan              Work Phone: +61 3 9843 8817
 [email protected]        Work Email: [email protected]
author maintainer
#2 lore raw

PATCH 1/1 dc395x - 2/3 remove-static-adapter-list

Remove the static list of adapters and the code related to keeping this up to date. The only remaining use for the static list was for the proc info function to find the scsi_host, but that's passed as a parameter anyway.

drivers/scsi/dc395x.c +6 -27
diff -r -du a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
@@ -387,7 +387,6 @@
   -----------------------------------------------------------------------*/
 struct AdapterCtlBlk {
 	struct Scsi_Host *scsi_host;
-	struct AdapterCtlBlk *next_acb;
 
 	u16 IOPortBase;
 
@@ -515,8 +514,6 @@
 /*---------------------------------------------------------------------------
                                  Static Data
  ---------------------------------------------------------------------------*/
-static struct AdapterCtlBlk *acb_list_head = NULL;
-static struct AdapterCtlBlk *acb_list_tail = NULL;
 static u16 current_sync_offset = 0;
 static char monitor_next_irq = 0;
 
@@ -5502,15 +5499,7 @@
 	}
  	print_config(acb);
 
- 	if (!init_adapter(host, io_port, irq)) {
- 		if (!acb_list_head) {
- 			acb_list_head = acb;
-  		} else {
- 			acb_list_tail->next_acb = acb;
-  		}
- 		acb_list_tail = acb;
- 		acb->next_acb = NULL;
-	} else {
+ 	if (init_adapter(host, io_port, irq)) {
 		dprintkl(KERN_INFO, "DC395x_initAdapter initial ERROR\n");
 		goto failed;
 	}
@@ -5557,25 +5546,15 @@
  else SPRINTF(" No  ")
 
 static
-int dc395x_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start, off_t offset, int length,
+int dc395x_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length,
 		     int inout)
 {
+	struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata;
 	int dev, spd, spd1;
 	char *pos = buffer;
-	struct AdapterCtlBlk *acb;
 	struct DeviceCtlBlk *dcb;
 	unsigned long flags;
 
-	acb = acb_list_head;
-
-	while (acb) {
-  		if (acb->scsi_host == shpnt)
-  			break;
-		acb = acb->next_acb;
-  	}
-	if (!acb)
-		return -ESRCH;
-
 	if (inout)		/* Has data been written to the file ? */
 		return -EPERM;
 
@@ -5584,15 +5563,15 @@
 
 	DC395x_LOCK_IO(acb->scsi_host, flags);
 
-	SPRINTF("SCSI Host Nr %i, ", shpnt->host_no);
+	SPRINTF("SCSI Host Nr %i, ", host->host_no);
 	SPRINTF("DC395U/UW/F DC315/U %s\n",
 		(acb->config & HCC_WIDE_CARD) ? "Wide" : "");
 	SPRINTF("IOPortBase 0x%04x, ", acb->IOPortBase);
 	SPRINTF("irq_level 0x%02x, ", acb->irq_level);
 	SPRINTF(" SelTimeout %ims\n", (1638 * acb->sel_timeout) / 1000);
 
-	SPRINTF("MaxID %i, MaxLUN %i, ", shpnt->max_id, shpnt->max_lun);
-	SPRINTF("AdapterID %i\n", shpnt->this_id);
+	SPRINTF("MaxID %i, MaxLUN %i, ", host->max_id, host->max_lun);
+	SPRINTF("AdapterID %i\n", host->this_id);
 
 	SPRINTF("tag_max_num %i", acb->tag_max_num);
 	/*SPRINTF(", DMA_Status %i\n", DC395x_read8(acb, TRM_S1040_DMA_STATUS)); */
Signature · 2 lines
 Jamie Lenehan              Work Phone: +61 3 9843 8817
 [email protected]        Work Email: [email protected]
author maintainer
#3 lore raw

PATCH 1/1 dc395x - 3/3 fix-failures

Handle the case where scsi_add_host fails and update the removal function to correctly unregister everything.

drivers/scsi/dc395x.c +22 -11
diff -r -du a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
@@ -5807,6 +5807,7 @@
 	u8 irq;
 	struct Scsi_Host *scsi_host;
 	static int banner_done = 0;
+	int error = 0;
 
 	dprintkdbg(DBG_0, "Init one instance of the dc395x\n");
 	if (!banner_done)
@@ -5832,20 +5833,21 @@
 		dprintkdbg(DBG_0, "host_init failed\n");
 		return -ENOMEM;
 	}
-
-	pci_set_master(dev);
-
-	/* store pci devices in out host data object. */
 	((struct AdapterCtlBlk *)(scsi_host->hostdata))->dev = dev;
-
-	/* store ptr to scsi host in the PCI device structure */
+	pci_set_master(dev);
 	pci_set_drvdata(dev, scsi_host);
 
 	/* get the scsi mid level to scan for new devices on the bus */
-	scsi_add_host(scsi_host, &dev->dev);	/* XXX handle failure */
-	scsi_scan_host(scsi_host);
-
-	return 0;
+	error = scsi_add_host(scsi_host, &dev->dev);
+	if (error) {
+		dprintkl(KERN_ERR, "scsi_add_host failed\n");
+                error = -ENODEV;
+                host_release(scsi_host);
+                scsi_host_put(scsi_host);
+	} else
+        	scsi_scan_host(scsi_host);
+        	
+	return error;
 }
 
 
@@ -5858,9 +5860,18 @@
 static void __devexit dc395x_remove_one(struct pci_dev *dev)
 {
 	struct Scsi_Host *host = pci_get_drvdata(dev);
+
 	dprintkdbg(DBG_0, "Removing instance\n");
-	scsi_remove_host(host);
+	if (!host) {
+		dprintkl(KERN_ERR, "no host allocated\n");
+		return;
+	}
+	if (scsi_remove_host(host)) {
+		dprintkl(KERN_ERR, "scsi_remove_host failed\n");
+		return;
+	}
 	host_release(host);
+	scsi_host_put(host);
 	pci_set_drvdata(dev, NULL);
 }
 
Signature · 2 lines
 Jamie Lenehan              Work Phone: +61 3 9843 8817
 [email protected]        Work Email: [email protected]
#4 lore raw

Re: [PATCH] dc395x - 1/3 remove-static-eeprom-struct

In reply to Jamie Lenehan
Quoted 4 lines · Jamie Lenehan

Move the eeprom details from a static struct indexed by adapter number into the adapter information block of the adapter. This removes the fixed size static array and removes the need to count the number of adapters.

This patch is rejecting fairly comprehensively against the dc395x driver in the tree, could you rediff against either 2.6.0-test2 or the bitkeeper scsi-misc-2.5 tree?

Thanks,

James

maintainer
#5 lore raw

Re: [Dc395x] Re: [PATCH] dc395x - 1/3 remove-static-eeprom-struct

Quoted 3 lines · James Bottomley

This patch is rejecting fairly comprehensively against the dc395x driver in the tree, could you rediff against either 2.6.0-test2 or the bitkeeper scsi-misc-2.5 tree?

Works pretty nice for me agains 2.6.0-test2-bk2. There are around 2800 lines of changes between 2.6.0-test2 and 2.6.0-test2-bk2 so it's most likely that this fails. Use the BK2 version please. Works like a charm here.

#6 lore raw

Re: [Dc395x] Re: [PATCH] dc395x - 1/3 remove-static-eeprom-struct

Quoted 4 lines · Ali Akcaagac

Works pretty nice for me agains 2.6.0-test2-bk2. There are around 2800 lines of changes between 2.6.0-test2 and 2.6.0-test2-bk2 so it's most likely that this fails. Use the BK2 version please. Works like a charm here.

Ah, OK, the driver's coming through the -ac tree. OK, I'll revert the current change I have in the scsi tree from you so as not to damage the merge.

James

maintainer
#7 lore raw

Re: [Dc395x] Re: [PATCH] dc395x - 1/3 remove-static-eeprom-struct

Quoted 3 lines · James Bottomley

Ah, OK, the driver's coming through the -ac tree. OK, I'll revert the current change I have in the scsi tree from you so as not to damage the merge.

Well the driver got in during 2.5.7x times through Linus himself after we sent him the initial stuff we did. During that time we made around 250-270kb of changes to the driver which we had some problems getting in due to the size. Around 2 weeks ago I contacted Alan Cox if he may review the changes we made during that time and if he could get it in somehow. So the changes (the 2500-2800 lines) showed up in the AC tree 1 week ago and now got merged into the test2-bk1/2 tree some days ago. During the merge there seemed to be a one char issue in bk2 which prevented the driver from compiling, that's why I sent in a little one liner patch that fixes this behaviour.

Jamie Lenehan fixed that stuff correctly now (because there was some XXX Fixme's in the code) as you see thats the 3 patches Jamie sent to the scsi list today/yesterday (depends on the timezone). These 3 patches should go against bk2 (which I have tested this morning) works and applies without any problems.

So if possible please add these 3 patches ontop of what's inside bk2, this will save us a lot of pain :)

greetings,

Ali Akcaagac

#8 lore raw

Re: [Dc395x] Re: [PATCH] dc395x - 1/3 remove-static-eeprom-struct

Quoted 2 lines · Ali Akcaagac

So if possible please add these 3 patches ontop of what's inside bk2, this will save us a lot of pain :)

That's not actually possible for me: the -bkX snapshots aren't tagged in the main BK tree. However, as long as no further updates are coming from elsewhere, the tree head is usually "good enough" to apply patches to.

In this case, it looks like with the exclusion I can apply to the tree head, so I'll merge the scsi-misc-2.5 repository up there.

James

maintainer
#9 lore raw

Re: [Dc395x] Re: [PATCH] dc395x - 1/3 remove-static-eeprom-struct

Quoted 7 lines · James Bottomley

That's not actually possible for me: the -bkX snapshots aren't tagged in the main BK tree. However, as long as no further updates are coming from elsewhere, the tree head is usually "good enough" to apply patches to.

In this case, it looks like with the exclusion I can apply to the tree head, so I'll merge the scsi-misc-2.5 repository up there.

Can you now please include the 3 new patches in the test3 ? As long as no one contributes other patches it's the chance to do it.

http://www.twibble.org/dist/dc395x/2.05/

01-03 should fit on bk3 w/o problems.

author maintainer
#10 lore raw

Re: [Dc395x] Re: [PATCH] dc395x - 1/3 remove-static-eeprom-struct

On Tue, Aug 12, 2003 at 06:12:09AM +0200, Ali Akcaagac wrote:
[...]

Quoted 2 lines

Can you now please include the 3 new patches in the test3 ? As long as no one contributes other patches it's the chance to do it.

The patches were added to the scsi-misc when the were originally sent to linux-scsi (see http://linux-scsi.bkbits.net:8080/scsi-misc-2.5).

They are not critical and they will get pushed along when James is ready to push them in.

So there's nothing to worry about.

Signature · 1 line
 Jamie Lenehan <[email protected]>