[SCSI] 53c700: Allow setting burst length
This is a patch, which allows not only disabling bursting but to specify different burst lenghts. This feature is needed to get the 53c700 driver working for the onboard SCSI controller of SNI RM machines, which only work reliably with a 4 word burst length. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
a8b3485287
commit
f67a9c1592
|
@ -667,12 +667,30 @@ NCR_700_chip_setup(struct Scsi_Host *host)
|
||||||
__u8 min_xferp = (hostdata->chip710 ? NCR_710_MIN_XFERP : NCR_700_MIN_XFERP);
|
__u8 min_xferp = (hostdata->chip710 ? NCR_710_MIN_XFERP : NCR_700_MIN_XFERP);
|
||||||
|
|
||||||
if(hostdata->chip710) {
|
if(hostdata->chip710) {
|
||||||
__u8 burst_disable = hostdata->burst_disable
|
__u8 burst_disable = 0;
|
||||||
? BURST_DISABLE : 0;
|
__u8 burst_length = 0;
|
||||||
|
|
||||||
|
switch (hostdata->burst_length) {
|
||||||
|
case 1:
|
||||||
|
burst_length = BURST_LENGTH_1;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
burst_length = BURST_LENGTH_2;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
burst_length = BURST_LENGTH_4;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
burst_length = BURST_LENGTH_8;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
burst_disable = BURST_DISABLE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
dcntl_extra = COMPAT_700_MODE;
|
dcntl_extra = COMPAT_700_MODE;
|
||||||
|
|
||||||
NCR_700_writeb(dcntl_extra, host, DCNTL_REG);
|
NCR_700_writeb(dcntl_extra, host, DCNTL_REG);
|
||||||
NCR_700_writeb(BURST_LENGTH_8 | hostdata->dmode_extra,
|
NCR_700_writeb(burst_length | hostdata->dmode_extra,
|
||||||
host, DMODE_710_REG);
|
host, DMODE_710_REG);
|
||||||
NCR_700_writeb(burst_disable | (hostdata->differential ?
|
NCR_700_writeb(burst_disable | (hostdata->differential ?
|
||||||
DIFF : 0), host, CTEST7_REG);
|
DIFF : 0), host, CTEST7_REG);
|
||||||
|
|
|
@ -203,7 +203,7 @@ struct NCR_700_Host_Parameters {
|
||||||
__u32 force_le_on_be:1;
|
__u32 force_le_on_be:1;
|
||||||
#endif
|
#endif
|
||||||
__u32 chip710:1; /* set if really a 710 not 700 */
|
__u32 chip710:1; /* set if really a 710 not 700 */
|
||||||
__u32 burst_disable:1; /* set to 1 to disable 710 bursting */
|
__u32 burst_length:4; /* set to 0 to disable 710 bursting */
|
||||||
|
|
||||||
/* NOTHING BELOW HERE NEEDS ALTERING */
|
/* NOTHING BELOW HERE NEEDS ALTERING */
|
||||||
__u32 fast:1; /* if we can alter the SCSI bus clock
|
__u32 fast:1; /* if we can alter the SCSI bus clock
|
||||||
|
|
|
@ -123,6 +123,7 @@ lasi700_probe(struct parisc_device *dev)
|
||||||
hostdata->force_le_on_be = 0;
|
hostdata->force_le_on_be = 0;
|
||||||
hostdata->chip710 = 1;
|
hostdata->chip710 = 1;
|
||||||
hostdata->dmode_extra = DMODE_FC2;
|
hostdata->dmode_extra = DMODE_FC2;
|
||||||
|
hostdata->burst_length = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
host = NCR_700_detect(&lasi700_template, hostdata, &dev->dev);
|
host = NCR_700_detect(&lasi700_template, hostdata, &dev->dev);
|
||||||
|
|
|
@ -123,6 +123,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
|
||||||
hostdata->differential = differential;
|
hostdata->differential = differential;
|
||||||
hostdata->clock = clock;
|
hostdata->clock = clock;
|
||||||
hostdata->chip710 = 1;
|
hostdata->chip710 = 1;
|
||||||
|
hostdata->burst_length = 8;
|
||||||
|
|
||||||
/* and register the chip */
|
/* and register the chip */
|
||||||
if((host = NCR_700_detect(&sim710_driver_template, hostdata, dev))
|
if((host = NCR_700_detect(&sim710_driver_template, hostdata, dev))
|
||||||
|
|
Loading…
Reference in a new issue