Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for 250MB ATAPI Zip drive #28

Open
aperezbios opened this issue Jun 26, 2023 · 1 comment
Open

Implement support for 250MB ATAPI Zip drive #28

aperezbios opened this issue Jun 26, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@aperezbios
Copy link
Contributor

Now that we have support for standard 100MB ATAPI Zip drives, implement support for the larger 250MB Zip drive

250MB disks have a capacity of 250,640,384 bytes, or, 489,532 sectors

  PQual=0  Device_type=0  RMB=1  LU_CONG=0  version=0x05  [SPC-3]
  [AERC=0]  [TrmTsk=0]  NormACA=1  HiSUP=1  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  [BQue=0]
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  [Linked=0]  [TranDis=0]  CmdQue=0
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=122 (0x7a)   Peripheral device type: disk
 Vendor identification: IOMEGA  
 Product identification: ZIP 250         
 Product revision level: 42.S
 00     00 80 05 32 75 00 00 00  49 4f 4d 45 47 41 20 20    ...2u...IOMEGA  
 10     5a 49 50 20 32 35 30 20  20 20 20 20 20 20 20 20    ZIP 250         
 20     34 32 2e 53 30 38 2f 30  38 2f 30 31 00 00 00 00    42.S08/08/01....
 30     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 40     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 50     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 60     28 63 29 20 43 6f 70 79  72 69 67 68 74 20 49 4f    (c) Copyright IO
 70     4d 45 47 41 20 32 30 30  30 20                      MEGA 2000 
  IOMEGA    ZIP 250           42.S
  Peripheral device type: disk
  IOMEGA    ZIP 250           42.S
  Peripheral device type: disk
  IOMEGA    ZIP 250           42.S
  Peripheral device type: disk
    IOMEGA    ZIP 250           42.S   peripheral_type: disk [0x0]
Mode parameter header from MODE SENSE(10):
  Mode data length=66, medium type=0x00, WP=0, DpoFua=0, longlba=0
  Block descriptor length=0
>> Read-Write error recovery, page_control: current
 00     01 06 c8 64 00 00 00 00
>> Flexible disk (obsolete), page_control: current
 00     05 1e 80 00 40 20 02 00  00 00 00 00 00 00 00 00
 10     00 00 00 00 00 00 00 00  00 00 00 00 0b 7d 00 00
>> Caching, page_control: current
 00     08 0a 04 00 ff ff 00 00  ff ff ff ff
>> page_code: 0x2f, page_control: current
 00     2f 04 5c 0f 3c 0f```
@aperezbios aperezbios added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Jun 26, 2023
@aperezbios
Copy link
Contributor Author

aperezbios commented Jul 7, 2023

Here's similar output to that requested for #20, but for 250MB Zip drives, with a 250MB disk in the drive

$ lsscsi -g
[1:0:1:0]    disk    IOMEGA   ZIP 250          42.S  /dev/sda   /dev/sg0
[4:0:0:0]    disk    ATA      Lexar SSD NQ100  035   /dev/sdb   /dev/sg1

$ sg_inq -v /dev/sg0
[sudo] password for aperez:
    inquiry cdb: [12 00 00 00 24 00]
    inquiry cdb: [12 00 00 00 7a 00]
    inquiry cdb: [12 01 00 00 fc 00]
inquiry:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
standard INQUIRY:
  PQual=0  Device_type=0  RMB=1  LU_CONG=0  version=0x05  [SPC-3]
  [AERC=0]  [TrmTsk=0]  NormACA=1  HiSUP=1  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  [BQue=0]
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  [Linked=0]  [TranDis=0]  CmdQue=0
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=122 (0x7a)   Peripheral device type: disk
 Vendor identification: IOMEGA
 Product identification: ZIP 250
 Product revision level: 42.S

$ sg_inq -vH /dev/sg0
    inquiry cdb: [12 00 00 00 24 00]
    inquiry cdb: [12 00 00 00 7a 00]
    inquiry cdb: [12 01 00 00 fc 00]
inquiry:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
 00     00 80 05 32 75 00 00 00  49 4f 4d 45 47 41 20 20    ...2u...IOMEGA
 10     5a 49 50 20 32 35 30 20  20 20 20 20 20 20 20 20    ZIP 250
 20     34 32 2e 53 30 38 2f 30  38 2f 30 31 00 00 00 00    42.S08/08/01....
 30     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 40     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 50     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 60     28 63 29 20 43 6f 70 79  72 69 67 68 74 20 49 4f    (c) Copyright IO
 70     4d 45 47 41 20 32 30 30  30 20                      MEGA 2000

$ sg_inq -v /dev/sg0
    inquiry cdb: [12 00 00 00 24 00]
    inquiry cdb: [12 00 00 00 7a 00]
    inquiry cdb: [12 01 00 00 fc 00]
inquiry:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
standard INQUIRY:
  PQual=0  Device_type=0  RMB=1  LU_CONG=0  version=0x05  [SPC-3]
  [AERC=0]  [TrmTsk=0]  NormACA=1  HiSUP=1  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  [BQue=0]
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  [Linked=0]  [TranDis=0]  CmdQue=0
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=122 (0x7a)   Peripheral device type: disk
 Vendor identification: IOMEGA
 Product identification: ZIP 250
 Product revision level: 42.S
 
$ sg_inq -vH /dev/sg0
    inquiry cdb: [12 00 00 00 24 00]
    inquiry cdb: [12 00 00 00 7a 00]
    inquiry cdb: [12 01 00 00 fc 00]
inquiry:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
 00     00 80 05 32 75 00 00 00  49 4f 4d 45 47 41 20 20    ...2u...IOMEGA
 10     5a 49 50 20 32 35 30 20  20 20 20 20 20 20 20 20    ZIP 250
 20     34 32 2e 53 30 38 2f 30  38 2f 30 31 00 00 00 00    42.S08/08/01....
 30     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 40     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 50     00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
 60     28 63 29 20 43 6f 70 79  72 69 67 68 74 20 49 4f    (c) Copyright IO
 70     4d 45 47 41 20 32 30 30  30 20                      MEGA 2000

$ sudo sg_get_config -v /dev/sg0
    inquiry cdb: [12 00 00 00 24 00]
  IOMEGA    ZIP 250           42.S
  Peripheral device type: disk
    get configuration cdb: 46 00 00 00 00 00 00 20 00 00
get configuration:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid command operation code
Get Configuration command: Illegal request, Invalid opcode, type: sense key + asc,ascq

$ sg_get_config -vi /dev/sg0
    inquiry cdb: [12 00 00 00 24 00]
  IOMEGA    ZIP 250           42.S
  Peripheral device type: disk
    get configuration cdb: 46 00 00 00 00 00 00 20 00 00
get configuration:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid command operation code

Get Configuration command: Illegal request, Invalid opcode, type: sense key + asc,ascq
$ sg_opcodes /dev/sg0
  IOMEGA    ZIP 250           42.S
  Peripheral device type: disk
Report supported operation codes: Illegal request, Invalid opcode

$ sg_readcap /dev/sg0
Read Capacity results:
   Last LBA=489531 (0x7783b), Number of logical blocks=489532
   Logical block length=512 bytes
Hence:
   Device size: 250640384 bytes, 239.0 MiB, 0.25 GB
    
$ sg_readcap -v /dev/sg0
    read capacity(10) cdb: [25 00 00 00 00 00 00 00 00 00]
Read Capacity results:
   Last LBA=489531 (0x7783b), Number of logical blocks=489532
   Logical block length=512 bytes
Hence:
   Device size: 250640384 bytes, 239.0 MiB, 0.25 GB

$ sg_modes -av /dev/sg0
    inquiry cdb: [12 00 00 00 24 00]
    IOMEGA    ZIP 250           42.S   peripheral_type: disk [0x0]
    mode sense(10) cdb: [5a 00 3f 00 00 00 00 10 00 00]
Mode parameter header from MODE SENSE(10):
  Mode data length=66, medium type=0x00, WP=0, DpoFua=0, longlba=0
  Block descriptor length=0
>> Read-Write error recovery, page_control: current
 00     01 06 c8 64 00 00 00 00
>> Flexible disk (obsolete), page_control: current
 00     05 1e 80 00 40 20 02 00  00 ef 00 00 00 00 00 00
 10     00 00 00 00 00 00 00 00  00 00 00 00 0b 7d 00 00
>> Caching, page_control: current
 00     08 0a 04 00 ff ff 00 00  ff ff ff ff
>> page_code: 0x2f, page_control: current
 00     2f 04 5c 0f 3c 0f
 
$ sg_vpd -av /dev/sg0
>>> struct opts_t differs in size from sg_vpd.c [52 != 56]
    inquiry cdb: [12 01 00 00 fc 00]
inquiry:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid field in cdb
svpd_decode_all: fetching VPD page 0 failed: Illegal request, type: sense key, apart from Invalid opcode
$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants