Bug 90741 - (IDE CF)SanDisk PCMCIA Flash card appears as two drives (hdc & hdd)
(IDE CF)SanDisk PCMCIA Flash card appears as two drives (hdc & hdd)
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
9
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-12 23:40 EDT by David Wilson
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-30 11:40:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Wilson 2003-05-12 23:40:50 EDT
Description of problem:
When I insert my SanDisk SDP3B-85 85MB Flash card into my NEC Versa Vxi laptop 
it shows up as hdc and hdd. A Compact Flash card in a PCMCIA adapter shows up 
correctly as only one drive. Both work fine under the "Redmond" O/S :-).

Version-Release number of selected component (if applicable):
kernel-2.4.20-8
kernel-pcmcia-cs-3.1.31-13

How reproducible:
Every time

Steps to Reproduce:
1. Insert SanDisk SDP3B-85 85MB Flash card into PCMCIA slot
2. Check /var/log/messages and or run fdisk -l
3.
    
Actual results:
/var/log/messages:
May 12 22:38:57 localhost cardmgr[1505]: socket 1: ATA/IDE Fixed Disk
May 12 22:38:57 localhost kernel: cs: memory probe 0xa0000000-0xa0ffffff: clean.
May 12 22:38:58 localhost cardmgr[1505]: executing: 'modprobe ide-cs'
May 12 22:39:00 localhost kernel: hdc: SunDisk SDP3B-85, CFA DISK drive
May 12 22:39:00 localhost kernel: hdd: SunDisk SDP3B-85, CFA DISK drive
May 12 22:39:00 localhost kernel: ide1 at 0x100-0x107,0x10e on irq 3
May 12 22:39:00 localhost kernel: ide-floppy driver 0.99.newide
May 12 22:39:00 localhost kernel: hdc: task_no_data_intr: status=0x51 { 
DriveReady SeekComplete Error }
May 12 22:39:00 localhost kernel: hdc: task_no_data_intr: error=0x04 { 
DriveStatusError }
May 12 22:39:00 localhost kernel: hdc: 166400 sectors (85 MB) w/1KiB Cache, 
CHS=650/8/32
May 12 22:39:00 localhost kernel: hdd: task_no_data_intr: status=0x51 { 
DriveReady SeekComplete Error }
May 12 22:39:00 localhost kernel: hdd: task_no_data_intr: error=0x04 { 
DriveStatusError }
May 12 22:39:00 localhost kernel: hdd: 166400 sectors (85 MB) w/1KiB Cache, 
CHS=650/8/32
May 12 22:39:00 localhost kernel:  hdc: hdc1
May 12 22:39:00 localhost kernel:  hdd: hdd1
May 12 22:39:00 localhost kernel: ide_cs: hdc: Vcc = 3.3, Vpp = 0.0

fdisk -l:
Disk /dev/hdc: 85MB, 85196800 bytes
8 heads, 32 sectors/track, 650 cylinders
Units = cylinders of 256 * 512 = 131072 byes

   Device Boot  Start   End   Blocks   Id  System
/dev/hdc1   *       1   649    83056    6  FAT16

Disk /dev/hdd: 85MB, 85196800 bytes
8 heads, 32 sectors/track, 650 cylinders
Units = cylinders of 256 * 512 = 131072 byes

   Device Boot  Start   End   Blocks   Id  System
/dev/hdd1   *       1   649    83056    6  FAT16

Disk /dev/hda: 20.0GB etc (this is my laptop's hard drive)

Expected results:
Only should get hdc not both hdc and hdd. Newer Compact Flash cards do not give 
these symptoms. Card does appear to be recognised as CFA 
(see /var/log/messages) even though it does not match "SunDisk SDCFB" string in 
function drive_is_flashcard() in file ide-probe.c.

Additional info:
Output from cardctl status and ident:

Socket 0:
  no card
Socket 1:
  3.3V 16-bit PC Card
  function 0: [ready], [bat dead], [bat low]

Socket 0:
  no product info available
Socket 1:
  product info: "SunDisk", "SDP", "5/3 0.6"
  manfid: 0x0045, 0x0401
  function: 4 (fixed disk)
Comment 1 Alan Cox 2003-05-13 08:17:51 EDT
Some older flash cards dont correctly decode master/slave. All anyone can
actually do with them is keep a blacklist of "has no slave" cards.  
Comment 2 David Wilson 2003-05-13 20:13:04 EDT
That was what I thought so I went looking for a blacklist and failed to find 
one. I did however find the following comment in ide-probe.c just above the 
function drive_is_flashcard():

CompactFlash cards and their brethern (sic) pretend to be removable hard disks, 
except: (1) they never have a slave unit, and (2) they don't have doorlock 
mechanisms.

As my card is showing up in the log as "SunDisk SDP3B-85, CFA DISK drive" it 
must be being detected as a Compact Flash card (otherwise ide-probe.c would 
have printed "ATA DISK drive") and hence according to note (1) above there 
should be no reason to check for a slave drive.
Comment 3 Alan Cox 2003-06-05 12:01:30 EDT
Now people use CF->IDE adapters its no longer true 8(
Comment 4 David Wilson 2003-06-05 21:53:23 EDT
If a PCMCIA/CF storage card is plugged into an IDE port it will presumably show 
up as an IDE device on a std controller whereas if it is plugged into a PCMCIA 
or CF port it will use the ide-cs driver. If this is the case, would it be 
possible for the latter driver to have code to disable probing for slave 
devices?
Comment 5 Bugzilla owner 2004-09-30 11:40:54 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

Note You need to log in before you can comment on or make changes to this bug.