All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/8] stex: update device id info
@ 2006-12-02  4:44 Ed Lin
  2006-12-02  5:09 ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Ed Lin @ 2006-12-02  4:44 UTC (permalink / raw)
  To: linux-scsi; +Cc: James.Bottomley, jeff, promise_linux


Update pci device id and Kconfig help information.

Signed-off-by: Ed Lin <ed.lin@promise.com>
---
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 1301d52..fb55373 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -968,8 +968,16 @@ config SCSI_STEX
 	tristate "Promise SuperTrak EX Series support"
 	depends on PCI && SCSI
 	---help---
-	  This driver supports Promise SuperTrak EX8350/8300/16350/16300
-	  Storage controllers.
+	  This driver supports Promise SuperTrak EX series storage controllers.
+	  These include SuperTrak EX8350, EX8300, EX16350, EX16300, EX12350,
+	  EX4350, EX24350; SuperTrak EX4650, EX4650o, EX8650EL, EX8650, EX8654;
+	  and VSC7250 series.
+
+	  Promise provides Linux RAID configuration utility for these
+	  controllers. Please visit <http://www.promise.com> to download.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called stex.
 
 config SCSI_SYM53C8XX_2
 	tristate "SYM53C8XX Version 2 SCSI support"
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index a20cbd9..c4ee038 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -120,8 +120,9 @@ enum {
 	ST_MAX_LUN_PER_TARGET			= 16,
 
 	st_shasta				= 0,
-	st_vsc					= 1,
-	st_yosemite				= 2,
+	st_vsc0					= 1,
+	st_vsc1					= 2,
+	st_yosemite				= 3,
 
 	PASSTHRU_REQ_TYPE			= 0x00000001,
 	PASSTHRU_REQ_NO_WAKEUP			= 0x00000100,
@@ -1356,15 +1357,41 @@ static void stex_shutdown(struct pci_dev
 }
 
 static struct pci_device_id stex_pci_tbl[] = {
-	{ 0x105a, 0x8350, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_shasta },
-	{ 0x105a, 0xc350, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_shasta },
-	{ 0x105a, 0xf350, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_shasta },
-	{ 0x105a, 0x4301, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_shasta },
-	{ 0x105a, 0x4302, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_shasta },
-	{ 0x105a, 0x8301, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_shasta },
-	{ 0x105a, 0x8302, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_shasta },
-	{ 0x1725, 0x7250, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_vsc },
-	{ 0x105a, 0x8650, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_yosemite },
+	/* st_shasta */
+	{ 0x105a, 0x8350, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+		st_shasta }, /* SuperTrak EX8350/8300/16350/16300 */
+	{ 0x105a, 0xc350, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+		st_shasta }, /* SuperTrak EX12350 */
+	{ 0x105a, 0x4302, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+		st_shasta }, /* SuperTrak EX4350 */
+	{ 0x105a, 0xe350, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+		st_shasta }, /* SuperTrak EX24350 */
+
+	/* st_vsc */
+	{ 0x105a, 0x7250, 0x105a, 0x1000, 0, 0, st_vsc0 },
+	{ 0x105a, 0x7250, 0x105a, 0x2500, 0, 0, st_vsc0 },
+	{ 0x105a, 0x7250, 0x105a, 0x2510, 0, 0, st_vsc0 },
+	{ 0x105a, 0x7250, 0x105a, 0x2520, 0, 0, st_vsc0 },
+	{ 0x105a, 0x7250, 0x105a, 0x2530, 0, 0, st_vsc0 },
+	{ 0x105a, 0x7250, 0x105a, 0x1001, 0, 0, st_vsc1 },
+	{ 0x105a, 0x7250, 0x105a, 0x2501, 0, 0, st_vsc1 },
+	{ 0x105a, 0x7250, 0x105a, 0x2511, 0, 0, st_vsc1 },
+	{ 0x105a, 0x7250, 0x105a, 0x2521, 0, 0, st_vsc1 },
+	{ 0x105a, 0x7250, 0x105a, 0x2531, 0, 0, st_vsc1 },
+
+	/* st_yosemite */
+	{ 0x105a, 0x8650, PCI_ANY_ID, 0x4600, 0, 0,
+		st_yosemite }, /* SuperTrak EX4650 */
+	{ 0x105a, 0x8650, PCI_ANY_ID, 0x4610, 0, 0,
+		st_yosemite }, /* SuperTrak EX4650o */
+	{ 0x105a, 0x8650, PCI_ANY_ID, 0x8600, 0, 0,
+		st_yosemite }, /* SuperTrak EX8650EL */
+	{ 0x105a, 0x8650, PCI_ANY_ID, 0x8601, 0, 0,
+		st_yosemite }, /* SuperTrak EX8650 */
+	{ 0x105a, 0x8650, PCI_ANY_ID, 0x8602, 0, 0,
+		st_yosemite }, /* SuperTrak EX8654 */
+	{ 0x105a, 0x8650, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+		st_yosemite }, /* generic st_yosemite */
 	{ }	/* terminate list */
 };
 MODULE_DEVICE_TABLE(pci, stex_pci_tbl);



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 5/8] stex: update device id info
  2006-12-02  4:44 [PATCH 5/8] stex: update device id info Ed Lin
@ 2006-12-02  5:09 ` Jeff Garzik
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2006-12-02  5:09 UTC (permalink / raw)
  To: Ed Lin; +Cc: linux-scsi, James.Bottomley, promise_linux

Ed Lin wrote:
> Update pci device id and Kconfig help information.
> 
> Signed-off-by: Ed Lin <ed.lin@promise.com>

NAK.  At the very least, this patch description needs enhancing, but 
more likely we need another PCI ID entry or two.


> ---
> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
> index 1301d52..fb55373 100644
> --- a/drivers/scsi/Kconfig
> +++ b/drivers/scsi/Kconfig
> @@ -968,8 +968,16 @@ config SCSI_STEX
>  	tristate "Promise SuperTrak EX Series support"
>  	depends on PCI && SCSI
>  	---help---
> -	  This driver supports Promise SuperTrak EX8350/8300/16350/16300
> -	  Storage controllers.
> +	  This driver supports Promise SuperTrak EX series storage controllers.
> +	  These include SuperTrak EX8350, EX8300, EX16350, EX16300, EX12350,
> +	  EX4350, EX24350; SuperTrak EX4650, EX4650o, EX8650EL, EX8650, EX8654;
> +	  and VSC7250 series.

I would strongly suggest eliminating the "These include ...." sentence. 
  Otherwise, you will be forced by marketing department to patch the 
driver every time a new board appears.


> -	{ 0x1725, 0x7250, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_vsc },
[...]
> +	/* st_vsc */
> +	{ 0x105a, 0x7250, 0x105a, 0x1000, 0, 0, st_vsc0 },
> +	{ 0x105a, 0x7250, 0x105a, 0x2500, 0, 0, st_vsc0 },
> +	{ 0x105a, 0x7250, 0x105a, 0x2510, 0, 0, st_vsc0 },
> +	{ 0x105a, 0x7250, 0x105a, 0x2520, 0, 0, st_vsc0 },
> +	{ 0x105a, 0x7250, 0x105a, 0x2530, 0, 0, st_vsc0 },
> +	{ 0x105a, 0x7250, 0x105a, 0x1001, 0, 0, st_vsc1 },
> +	{ 0x105a, 0x7250, 0x105a, 0x2501, 0, 0, st_vsc1 },
> +	{ 0x105a, 0x7250, 0x105a, 0x2511, 0, 0, st_vsc1 },
> +	{ 0x105a, 0x7250, 0x105a, 0x2521, 0, 0, st_vsc1 },
> +	{ 0x105a, 0x7250, 0x105a, 0x2531, 0, 0, st_vsc1 },

Normal this sort of change -- not providing a generic PCI_ANY_ID entries 
for the sub-device and sub-vendor IDs -- is a bad idea.

This means that the VSC-related section of the pci_device_id table will 
be very maintenance intensive over time.  It also means that new or 
unknown compatible devices will not automatically be picked up by the 
driver.

It may be preferable even to do

	 0x105a, 0x7250, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_vsc0

and then in the PCI init routine, add code that looks something like

	if ((ent->driver_data == st_vsc0) && (test for newer rev1))
		driver_data = st_vsc1;
	else
		driver_data = st_vsc0;

Regards,

	Jeff



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 5/8] stex: update device id info
@ 2006-12-04 18:10 Ed Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Ed Lin @ 2006-12-04 18:10 UTC (permalink / raw)
  To: jeff; +Cc: linux-scsi, james.Bottomley, promise_linux


>-----Original Message-----
>From: Jeff Garzik [mailto:jeff@garzik.org] 
>Sent: Friday, December 01, 2006 9:10 PM
>To: Ed Lin
>Cc: linux-scsi; James.Bottomley; Promise_Linux
>Subject: Re: [PATCH 5/8] stex: update device id info
>
>
>Ed Lin wrote:
>> Update pci device id and Kconfig help information.
>> 
>> Signed-off-by: Ed Lin <ed.lin@promise.com>
>
>NAK.  At the very least, this patch description needs enhancing, but 
>more likely we need another PCI ID entry or two.
>
>
>> ---
>> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 
>> 1301d52..fb55373 100644
>> --- a/drivers/scsi/Kconfig
>> +++ b/drivers/scsi/Kconfig
>> @@ -968,8 +968,16 @@ config SCSI_STEX
>>  	tristate "Promise SuperTrak EX Series support"
>>  	depends on PCI && SCSI
>>  	---help---
>> -	  This driver supports Promise SuperTrak EX8350/8300/16350/16300
>> -	  Storage controllers.
>> +	  This driver supports Promise SuperTrak EX series storage
>controllers.
>> +	  These include SuperTrak EX8350, EX8300, EX16350, EX16300,
>EX12350,
>> +	  EX4350, EX24350; SuperTrak EX4650, EX4650o, EX8650EL, EX8650,
>EX8654;
>> +	  and VSC7250 series.
>
>I would strongly suggest eliminating the "These include ...." sentence. 
>  Otherwise, you will be forced by marketing department to patch the 
>driver every time a new board appears.
>
>
>> -	{ 0x1725, 0x7250, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_vsc },
>[...]
>> +	/* st_vsc */
>> +	{ 0x105a, 0x7250, 0x105a, 0x1000, 0, 0, st_vsc0 },
>> +	{ 0x105a, 0x7250, 0x105a, 0x2500, 0, 0, st_vsc0 },
>> +	{ 0x105a, 0x7250, 0x105a, 0x2510, 0, 0, st_vsc0 },
>> +	{ 0x105a, 0x7250, 0x105a, 0x2520, 0, 0, st_vsc0 },
>> +	{ 0x105a, 0x7250, 0x105a, 0x2530, 0, 0, st_vsc0 },
>> +	{ 0x105a, 0x7250, 0x105a, 0x1001, 0, 0, st_vsc1 },
>> +	{ 0x105a, 0x7250, 0x105a, 0x2501, 0, 0, st_vsc1 },
>> +	{ 0x105a, 0x7250, 0x105a, 0x2511, 0, 0, st_vsc1 },
>> +	{ 0x105a, 0x7250, 0x105a, 0x2521, 0, 0, st_vsc1 },
>> +	{ 0x105a, 0x7250, 0x105a, 0x2531, 0, 0, st_vsc1 },
>
>Normal this sort of change -- not providing a generic PCI_ANY_ID entries
>
>for the sub-device and sub-vendor IDs -- is a bad idea.
>
>This means that the VSC-related section of the pci_device_id table will 
>be very maintenance intensive over time.  It also means that new or 
>unknown compatible devices will not automatically be picked up by the 
>driver.
>
>It may be preferable even to do
>
>	 0x105a, 0x7250, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_vsc0
>
>and then in the PCI init routine, add code that looks something like
>
>	if ((ent->driver_data == st_vsc0) && (test for newer rev1))
>		driver_data = st_vsc1;
>	else
>		driver_data = st_vsc0;
>
Thanks for comment.

If a new device would use a new device id then the driver has to be
patched anyway (e.g. EX24350 uses 0xe350 as device id).  If a series
uses a single device id and different subdevice ids then we could use
PCI_ANY_ID for subdevice id. But I just want to make it clear to the
user what devices this driver actually supports.  "SuperTrak EX
series" or "stex" is ok, but this is becoming more or less a general
name, and I am afraid it may not be sufficient or accurate to describe
all the devices.

I will re-work and re-post the patches.

= = = = = = = = = = = = = = = = = = = =
			
Ed Lin




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-04 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-02  4:44 [PATCH 5/8] stex: update device id info Ed Lin
2006-12-02  5:09 ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2006-12-04 18:10 Ed Lin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.