linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Enable 16-bit CDBs for aic7xxx/aic79xxx
@ 2007-07-23  8:47 Hannes Reinecke
  2007-07-23  8:53 ` Hannes Reinecke
  2007-07-24 17:04 ` James Bottomley
  0 siblings, 2 replies; 4+ messages in thread
From: Hannes Reinecke @ 2007-07-23  8:47 UTC (permalink / raw)
  To: James Bottomley, SCSI Mailing List

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

Hi James,

this patch enables 16-bit CDBs for aic7xxx and aic79xx. aic7xxx actuallys
supports up to 32-bit CDBs, so it might be that aic79xx does that, too.
But this would include some more hacking, so this is way easier.

Please apply.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

[-- Attachment #2: aic7xxx-enable-16byte-cdbs --]
[-- Type: text/plain, Size: 1343 bytes --]

Enable 16-bit CDBs for aic7xxx/aix79xx

The patch enables support for 16-bit CDBs in aic7xxx and aic79xx.
aic7xxx can actually support up to 32-bit CDBs, should they ever see
the light of day.

Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 286ab83..8502085 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -1089,6 +1089,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa
 	host->max_id = (ahd->features & AHD_WIDE) ? 16 : 8;
 	host->max_lun = AHD_NUM_LUNS;
 	host->max_channel = 0;
+	host->max_cmd_len = MAX_CDB_LEN;
 	host->sg_tablesize = AHD_NSEG;
 	ahd_lock(ahd, &s);
 	ahd_set_unit(ahd, ahd_linux_unit++);
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 1803ab6..a6b3071 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1047,6 +1047,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
 	host->max_id = (ahc->features & AHC_WIDE) ? 16 : 8;
 	host->max_lun = AHC_NUM_LUNS;
 	host->max_channel = (ahc->features & AHC_TWIN) ? 1 : 0;
+	host->max_cmd_len = 32;
 	host->sg_tablesize = AHC_NSEG;
 	ahc_lock(ahc, &s);
 	ahc_set_unit(ahc, ahc_linux_unit++);

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

* Re: [PATCH] Enable 16-bit CDBs for aic7xxx/aic79xxx
  2007-07-23  8:47 [PATCH] Enable 16-bit CDBs for aic7xxx/aic79xxx Hannes Reinecke
@ 2007-07-23  8:53 ` Hannes Reinecke
  2007-07-24 10:29   ` Benny Halevy
  2007-07-24 17:04 ` James Bottomley
  1 sibling, 1 reply; 4+ messages in thread
From: Hannes Reinecke @ 2007-07-23  8:53 UTC (permalink / raw)
  To: James Bottomley; +Cc: SCSI Mailing List

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

Hannes Reinecke wrote:
> Hi James,
> 
> this patch enables 16-bit CDBs for aic7xxx and aic79xx. aic7xxx actuallys
> supports up to 32-bit CDBs, so it might be that aic79xx does that, too.
> But this would include some more hacking, so this is way easier.
> 
Yeah, grand. That should read '16-byte CDBs', of course.

But at least I've been consistent :-)
New patch attached.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

[-- Attachment #2: aic7xxx-enable-16byte-cdbs --]
[-- Type: text/plain, Size: 1346 bytes --]

Enable 16-byte CDBs for aic7xxx/aix79xx

The patch enables support for 16-byte CDBs in aic7xxx and aic79xx.
aic7xxx can actually support up to 32-byte CDBs, should they ever see
the light of day.

Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 286ab83..8502085 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -1089,6 +1089,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa
 	host->max_id = (ahd->features & AHD_WIDE) ? 16 : 8;
 	host->max_lun = AHD_NUM_LUNS;
 	host->max_channel = 0;
+	host->max_cmd_len = MAX_CDB_LEN;
 	host->sg_tablesize = AHD_NSEG;
 	ahd_lock(ahd, &s);
 	ahd_set_unit(ahd, ahd_linux_unit++);
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 1803ab6..a6b3071 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1047,6 +1047,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
 	host->max_id = (ahc->features & AHC_WIDE) ? 16 : 8;
 	host->max_lun = AHC_NUM_LUNS;
 	host->max_channel = (ahc->features & AHC_TWIN) ? 1 : 0;
+	host->max_cmd_len = 32;
 	host->sg_tablesize = AHC_NSEG;
 	ahc_lock(ahc, &s);
 	ahc_set_unit(ahc, ahc_linux_unit++);

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

* Re: [PATCH] Enable 16-bit CDBs for aic7xxx/aic79xxx
  2007-07-23  8:53 ` Hannes Reinecke
@ 2007-07-24 10:29   ` Benny Halevy
  0 siblings, 0 replies; 4+ messages in thread
From: Benny Halevy @ 2007-07-24 10:29 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: James Bottomley, SCSI Mailing List

Just wondering, have you tried testing it with our patches to support
long cdb?  If not, it would be great if you could try doing that.
A snapshot of them is in http://www.bhalevy.com/open-osd/download/sgtable_bidi_varlen/

Benny

Hannes Reinecke wrote:
> Hannes Reinecke wrote:
>> Hi James,
>>
>> this patch enables 16-bit CDBs for aic7xxx and aic79xx. aic7xxx actuallys
>> supports up to 32-bit CDBs, so it might be that aic79xx does that, too.
>> But this would include some more hacking, so this is way easier.
>>
> Yeah, grand. That should read '16-byte CDBs', of course.
> 
> But at least I've been consistent :-)
> New patch attached.
> 
> Cheers,
> 
> Hannes
> 
> 
> ------------------------------------------------------------------------
> 
> Enable 16-byte CDBs for aic7xxx/aix79xx
> 
> The patch enables support for 16-byte CDBs in aic7xxx and aic79xx.
> aic7xxx can actually support up to 32-byte CDBs, should they ever see
> the light of day.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> 
> diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
> index 286ab83..8502085 100644
> --- a/drivers/scsi/aic7xxx/aic79xx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
> @@ -1089,6 +1089,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa
>  	host->max_id = (ahd->features & AHD_WIDE) ? 16 : 8;
>  	host->max_lun = AHD_NUM_LUNS;
>  	host->max_channel = 0;
> +	host->max_cmd_len = MAX_CDB_LEN;
>  	host->sg_tablesize = AHD_NSEG;
>  	ahd_lock(ahd, &s);
>  	ahd_set_unit(ahd, ahd_linux_unit++);
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> index 1803ab6..a6b3071 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -1047,6 +1047,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
>  	host->max_id = (ahc->features & AHC_WIDE) ? 16 : 8;
>  	host->max_lun = AHC_NUM_LUNS;
>  	host->max_channel = (ahc->features & AHC_TWIN) ? 1 : 0;
> +	host->max_cmd_len = 32;
>  	host->sg_tablesize = AHC_NSEG;
>  	ahc_lock(ahc, &s);
>  	ahc_set_unit(ahc, ahc_linux_unit++);


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

* Re: [PATCH] Enable 16-bit CDBs for aic7xxx/aic79xxx
  2007-07-23  8:47 [PATCH] Enable 16-bit CDBs for aic7xxx/aic79xxx Hannes Reinecke
  2007-07-23  8:53 ` Hannes Reinecke
@ 2007-07-24 17:04 ` James Bottomley
  1 sibling, 0 replies; 4+ messages in thread
From: James Bottomley @ 2007-07-24 17:04 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: SCSI Mailing List

On Mon, 2007-07-23 at 10:47 +0200, Hannes Reinecke wrote:
> Hi James,
> 
> this patch enables 16-bit CDBs for aic7xxx and aic79xx. aic7xxx actuallys
> supports up to 32-bit CDBs, so it might be that aic79xx does that, too.
> But this would include some more hacking, so this is way easier.
> 
> Please apply.
> 
> Cheers,
> 
> Hannes
> plain text document attachment (aic7xxx-enable-16byte-cdbs)
> Enable 16-bit CDBs for aic7xxx/aix79xx
> 
> The patch enables support for 16-bit CDBs in aic7xxx and aic79xx.
> aic7xxx can actually support up to 32-bit CDBs, should they ever see
> the light of day.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> 
> diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
> index 286ab83..8502085 100644
> --- a/drivers/scsi/aic7xxx/aic79xx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
> @@ -1089,6 +1089,7 @@ ahd_linux_register_host(struct ahd_softc *ahd, struct scsi_host_template *templa
>  	host->max_id = (ahd->features & AHD_WIDE) ? 16 : 8;
>  	host->max_lun = AHD_NUM_LUNS;
>  	host->max_channel = 0;
> +	host->max_cmd_len = MAX_CDB_LEN;

If aic79xx only supports 16 byte CDBs without modification, shouldn't
this be set to 16?  MAX_CDB_LEN could easily end up being patched to be
larger and then aic79xx would be in trouble.

James



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

end of thread, other threads:[~2007-07-24 17:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23  8:47 [PATCH] Enable 16-bit CDBs for aic7xxx/aic79xxx Hannes Reinecke
2007-07-23  8:53 ` Hannes Reinecke
2007-07-24 10:29   ` Benny Halevy
2007-07-24 17:04 ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).