scsi: ppa: Fix compilation with PPA_DEBUG=1
PATCH 1/2 scsi: ppa: Fix compilation with PPA_DEBUG=1
Fix a regression introduced in February 2003 in Linux 2.5.61 by a patch from Alan Cox titled "fix ppa for new scsi".[1]
--- drivers/scsi/ppa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ppa.c +1 -1
@@ -637,7 +637,7 @@ static void ppa_interrupt(struct work_struct *work)case DID_OK :break ;case DID_NO_CONNECT : -printk (KERN_DEBUG "ppa: no device at SCSI ID %i\n" , cmd->device->target); +printk (KERN_DEBUG "ppa: no device at SCSI ID %i\n" ,scmd_id (cmd));break ;case DID_BUS_BUSY :printk (KERN_DEBUG "ppa: BUS BUSY - EPP timeout detected\n" );
Signature · 1 line
2.41.0
PATCH 2/2 scsi: ppa: Add a module parameter for the transfer mode
I have an Iomega Z100P2 zip drive, but it does not work with my StarTech PEX1P2 AX99100 PCIe parallel port, which evidently does not support 16-bit or 32-bit EPP. Currently the only way to tell the PPA driver to use 8-bit EPP is to write 'mode=3' to /proc/scsi/ppa/*, but the driver doesn't actually distinguish between the three EPP modes and still tries to use 16-bit or 32-bit EPP. And even if writing to that file did make the driver use 8-bit EPP, it still wouldn't do me any good because by the time that file exists, the drive has already failed to initialize.
Add a new parameter /sys/module/ppa/mode to set the transfer mode before initializing the drive. This parameter replaces the use of CONFIG_SCSI_IZIP_EPP16 in the PPA driver.
At the same time, default to 8-bit EPP. 16-bit and 32-bit EPP are not necessary for the drive to function, nor are they part of the IEEE 1284 standard, so the driver should not assume that they are available.
--- drivers/scsi/Kconfig | 2 +- drivers/scsi/ppa.c | 82 +++++++++++++++++++++++--------------------- drivers/scsi/ppa.h | 4 --- 3 files changed, 43 insertions(+), 45 deletions(-)
drivers/scsi/Kconfig +1 -1
@@ -836,7 +836,7 @@ config SCSI_IMM config SCSI_IZIP_EPP16 bool "ppa/imm option - Use slow (but safe) EPP-16" - depends on SCSI_PPA || SCSI_IMM + depends on SCSI_IMM help EPP (Enhanced Parallel Port) is a standard for parallel ports which allows them to act as expansion buses that can handle up to 64
drivers/scsi/ppa.c +42 -40
162 lines not on this page · raw message
drivers/scsi/ppa.h +0 -4
@@ -107,11 +107,7 @@ static char *PPA_MODE_STRING[] ="PS/2" ,"EPP 8 bit" ,"EPP 16 bit" , -#ifdef CONFIG_SCSI_IZIP_EPP16 -"EPP 16 bit" , -#else"EPP 32 bit" , -#endif "Unknown"};/* other options */
Signature · 1 line
2.41.0
Re: [PATCH 2/2] scsi: ppa: Add a module parameter for the transfer mode
Quoted 2 lines · Alex Henrie
Add a new parameter
/sys/module/ppa/modeto set the transfer mode before initializing the drive.
Just noticed another typo: The file is /sys/module/ppa/parameters/mode (I left out the parameters directory). Hopefully that doesn't confuse anyone too much.
-Alex
Martin K. Petersen
AppliedAlex,
Quoted 2 lines
Fix a regression introduced in February 2003 in Linux 2.5.61 by a patch from Alan Cox titled "fix ppa for new scsi".[1]
Applied patches 1+2 to 6.6/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 4 lines · Alex Henrie
Fix a regression introduced in February 2003 in Linux 2.5.61 by a patch from Alan Cox titled "fix ppa for new scsi".[1]
Applied to 6.6/scsi-queue, thanks!
[1/2] scsi: ppa: Fix compilation with PPA_DEBUG=1
https://git.kernel.org/mkp/scsi/c/b68442ebda9c [2/2] scsi: ppa: Add a module parameter for the transfer mode https://git.kernel.org/mkp/scsi/c/68a4f84a17c1
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering