background on porting a 2.4 SCSI SATA driver to 2. 6
From: Joseph Harvell (jharvell_at_dogpad.net)
Date: 01/23/05
- Next message: Mr usobe: "WUSB54G device Driver"
- Previous message: Robijashi: "Routing USB Magnetic Stripe Reader to a file handle"
- Next in thread: Bill Waddington: "Re: background on porting a 2.4 SCSI SATA driver to 2. 6"
- Reply: Bill Waddington: "Re: background on porting a 2.4 SCSI SATA driver to 2. 6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 23 Jan 2005 01:51:50 GMT
I just bought a controller from Promise that isn't yet supported in the 2.6 kernel (Promise SATA-II 150 TX4). This is similar
to the STATA 150 TX4, and I thought sata_promise.c would support it but it doesn't.
Promise provides binary versions of the driver for Redhat and SuSE, but both are for specific kernel versions. They also
provide the source code for the driver, but it was apparently written for a 2.4 kernel. There are some #ifdef's in the code
that suggest it should also compile on a 2.5 series kernel, but it obviously never compiled successfully for 2.5 (there was a
missing brace in one of the 2.5 ifdef sections).
I read through the kbuild stuff in my 2.6.10 kernel, and I eventually was able to port it to build for that kernel. However,
while I was porting I noticed that it used a lot of obsoleted and deprecated interfaces. When I loaded the module, it trapped
(see below).
I would like to know where I can get some background necessary for re-writing this driver for 2.6. I have "Linux Device
Drivers" for the 2.4 kernel, but it doesn't really cover SCSI drivers. Also, I need to know what has changed from 2.4 to 2.6
since that's not covered in "Linux Device Drivers."
I have designed and implemented software in multi-threaded systems and I have read about half of "Linux Device Drivers." I have
implemented a simple character driver but otherwise have no experience in the Linux kernel.
Where should I start?
Jan 22 16:21:37 dingo PROMISE SATA-II 150 Series Linux Driver v1.00.0.12
Jan 22 16:21:37 dingo ACPI: PCI interrupt 0000:02:05.0[A] -> GSI 17 (level, low) -> IRQ 17
Jan 22 16:21:37 dingo ulsata2:[info] Drive 1: Maxtor 6B300S0 586114703s 300091MB UDMA6
Jan 22 16:21:37 dingo scsi1 : Promise SATA-II series controller
Jan 22 16:21:37 dingo Unable to handle kernel NULL pointer dereference at virtual address 00000080
Jan 22 16:21:37 dingo printing eip:
Jan 22 16:21:37 dingo c01f5ddb
Jan 22 16:21:37 dingo *pde = 00000000
Jan 22 16:21:37 dingo Oops: 0000 [#1]
Jan 22 16:21:37 dingo PREEMPT SMP
Jan 22 16:21:37 dingo Modules linked in: ulsata2 floppy agpgart nvidia w83627hf eeprom w83781d i2c_sensor i2c_isa i2c_amd756
i2c_core vmnet vmmon ipv6 snd_seq_midi snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul snd_emu10k1
snd_rawmidi snd_ac97_codec snd_util_mem snd_hwdep snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_pcm
snd_timer snd_page_alloc snd_mixer_oss snd rtc ext3 jbd dm_mod ide_disk usblp joydev tsdev evdev usbhid ide_generic ohci_hcd
usbcore capability commoncap 3c59x ide_tape st ide_cd ide_core
sr_mod cdrom unix
Jan 22 16:21:37 dingo CPU: 0
Jan 22 16:21:37 dingo EIP: 0060:[<c01f5ddb>] Tainted: P VLI
Jan 22 16:21:37 dingo EFLAGS: 00010286 (2.6.10-gentoo-r5-dingo-default)
Jan 22 16:21:37 dingo EIP is at kref_get+0xb/0x50
Jan 22 16:21:37 dingo eax: 00000080 ebx: 00000080 ecx: 00000005 edx: 00000000
Jan 22 16:21:37 dingo esi: f6d260c4 edi: f6d26122 ebp: ffffffea esp: e6b62f24
Jan 22 16:21:37 dingo ds: 007b es: 007b ss: 0068
Jan 22 16:21:37 dingo Process insmod (pid: 5662, threadinfo=e6b62000 task=f7b450e0)
Jan 22 16:21:37 dingo Stack: 00000000 00000000 c011cfb2 00000000 00000068 c01f52fa 00000080 f6d2611c
Jan 22 16:21:37 dingo c025c2b8 00000068 c025c182 00000044 e6b62f78 f8e41060 00000000 f6d260c4
Jan 22 16:21:37 dingo f6d26000 ffffffea 00000000 c0270e23 f6d260c4 00000001 f8e3c5a0 f6d26000
Jan 22 16:21:37 dingo Call Trace:
Jan 22 16:21:37 dingo [<c011cfb2>] release_console_sem+0xb2/0xc0
Jan 22 16:21:37 dingo [<c01f52fa>] kobject_get+0x1a/0x30
Jan 22 16:21:37 dingo [<c025c2b8>] get_device+0x18/0x30
Jan 22 16:21:37 dingo [<c025c182>] device_add+0x72/0x160
Jan 22 16:21:37 dingo [<c0270e23>] scsi_add_host+0x73/0x140
Jan 22 16:21:37 dingo [<f8da406c>] init_this_scsi_driver+0x6c/0xe1 [ulsata2]
Jan 22 16:21:37 dingo [<c0136182>] sys_init_module+0x172/0x220
Jan 22 16:21:37 dingo [<c010320f>] syscall_call+0x7/0xb
Jan 22 16:21:37 dingo Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 8b 44 24 04 c7 00 01 00 00 00 c3 90 8d 74 26 00 83
ec 14 89 5c 24 10 8b 5c 24 18 <8b> 03 85 c0 74 0b f0 ff 03 8b 5c 24 10 83 c4 14 c3 c7 44 24 0c
- Next message: Mr usobe: "WUSB54G device Driver"
- Previous message: Robijashi: "Routing USB Magnetic Stripe Reader to a file handle"
- Next in thread: Bill Waddington: "Re: background on porting a 2.4 SCSI SATA driver to 2. 6"
- Reply: Bill Waddington: "Re: background on porting a 2.4 SCSI SATA driver to 2. 6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|