Skip to contentSkip to conversation

2.5.1-pre2 compile error in ide-scsi.o ide-scsi.c

DISCUSSION Sebastian Dröge 4 participants 4 messages Nov 27, 2001 – Nov 28, 2001 SCSI

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ok
I've corrected it myself I think
The patch is attached
Hopefully it doesn't break something :) It's my first patch so please don't kill me Bye

PS: sorry if/when you get this mail twice :( My mail client is a bit confused today

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8A/xbvIHrJes3kVIRAoyxAJ4+XrCYXffS3P8zCmttT5WvkJ6w1QCdGpxK nMof4o/n2VictCFrvZGRXeA=
=04xe
-----END PGP SIGNATURE-----

drivers/scsi/ide-scsi.c.old renamed from drivers/scsi/ide-scsi.c +6 -6
@@ -707,9 +707,9 @@
 		printk ("ide-scsi: %s: building DMA table, %d segments, %dkB total\n", drive->name, segments, pc->request_transfer >> 10);
 #endif /* IDESCSI_DEBUG_LOG */
 		while (segments--) {
-			bh->bi_io_vec->bvl_vec->bv_page = sg->page;
-			bh->bi_io_vec->bvl_vec->bv_len = sg->length;
-			bh->bi_io_vec->bvl_vec->bv_offset = sg->offset;
+			bh->bi_io_vec.bv_page = sg->page;
+			bh->bi_io_vec.bv_len = sg->length;
+			bh->bi_io_vec.bv_offset = sg->offset;
 			bh = bh->bi_next;
 			sg++;
 		}
@@ -719,9 +719,9 @@
 #if IDESCSI_DEBUG_LOG
 		printk ("ide-scsi: %s: building DMA table for a single buffer (%dkB)\n", drive->name, pc->request_transfer >> 10);
 #endif /* IDESCSI_DEBUG_LOG */
-		bh->bi_io_vec->bvl_vec->bv_page = virt_to_page(pc->scsi_cmd->request_buffer);
-		bh->bi_io_vec->bvl_vec->bv_len = pc->request_transfer;
-		bh->bi_io_vec->bvl_vec->bv_offset = (unsigned long) pc->scsi_cmd->request_buffer & ~PAGE_MASK;
+		bh->bi_io_vec.bv_page = virt_to_page(pc->scsi_cmd->request_buffer);
+		bh->bi_io_vec.bv_len = pc->request_transfer;
+		bh->bi_io_vec.bv_offset = (unsigned long) pc->scsi_cmd->request_buffer & ~PAGE_MASK;
 	}
 	return first_bh;
 }
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think the patch doesn't work :(
When I try to mount a CD over SCSI emulation I get this nice oops:

Unable to handle kernel NULL pointer dereference at virtual address 00000004
Nov 27 22:24:00 slomosnail kernel:  printing eip:
Nov 27 22:24:00 slomosnail kernel: c01d0497
Nov 27 22:24:00 slomosnail kernel: *pde = 00000000
Nov 27 22:24:00 slomosnail kernel: Oops: 0000
Nov 27 22:24:00 slomosnail kernel: CPU:    0
Nov 27 22:24:00 slomosnail kernel: EIP:    0010:[idescsi_queue+1195/1508]   
Not tainted
Nov 27 22:24:00 slomosnail kernel: EFLAGS: 00010046
Nov 27 22:24:00 slomosnail kernel: eax: 00000000   ebx: c14cfda0   ecx: 
00000000   edx: c14cfda0
Nov 27 22:24:00 slomosnail kernel: esi: c0302000   edi: c14cfda0   ebp: 
c14cfda0   esp: cc401e5c
Nov 27 22:24:00 slomosnail kernel: ds: 0018   es: 0018   ss: 0018
Nov 27 22:24:00 slomosnail kernel: Process mount (pid: 192, 
stackpage=cc401000)
Nov 27 22:24:00 slomosnail kernel: Stack: 00000293 c15a5600 c15a5600 c15ba0c0 
00000014 cc9b89a0 c15a5658 c0302000
Nov 27 22:24:00 slomosnail kernel:        00000000 00000000 cc6ca4c0 c15e12c0 
c02fb2dc c01c582a c15a5600 c01ca8bc
Nov 27 22:24:00 slomosnail kernel:        c02925c0 c15a5600 c01cd214 c15a56b8 
00000000 c01cc434 c15a5600 c15a5600
Nov 27 22:24:00 slomosnail kernel: Call Trace: [scsi_dispatch_cmd+430/544] 
[scsi_old_done+0/1852] [scsi_init_io_v+0/392] [scsi_request_fn+1420/1440] 
[block_read_full_page+468/488]
Nov 27 22:24:00 slomosnail kernel:    [generic_unplug_device+37/44] 
[__run_task_queue+76/88] [block_sync_page+22/28] [___wait_on_page+101/140] 
[do_generic_file_read+828/1172] [generic_file_read+129/308]
Nov 27 22:24:00 slomosnail kernel:    [file_read_actor+0/92] 

[sys_read+143/196] [system_call+51/56]

Nov 27 22:24:00 slomosnail kernel: Code: 8b 51 04 8b 46 04 8d 14 52 83 c1 10 

89 04 91 8b 4f 1c 8b 46

After that the System is still responsible but a few minutes later I get this in a endless loop:
scsi : aborting command due to timeout : pid 30, scsi0, channel 0, id 1, lun 0 0x28 00 00 00 00 00 00 00 02 00

I've tried
bh->bi_io_vec->bvl_vec[0].*
instead of
bh->bi_io_vec->bvl_vec->*
but I still get this errors
Maybe someone knows more... I don't

Bye

Am Dienstag, 27. November 2001 21:49 schrieb Sebastian Dröge:

Quoted 9 lines

ok
I've corrected it myself I think
The patch is attached
Hopefully it doesn't break something :) It's my first patch so please don't kill me Bye

PS: sorry if/when you get this mail twice :( My mail client is a bit confused today

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8BAeFvIHrJes3kVIRArcCAKCF51wrFnZ1RY+n2Qz2d6FhRti9LACgr/3G ijxtXFVn7SqHc1XlDvEq0BA=
=ZqKg
-----END PGP SIGNATURE-----

#2 lore raw
In reply to Sebastian Dröge
Quoted 10 lines · Sebastian Dröge

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ok
I've corrected it myself I think
The patch is attached
Hopefully it doesn't break something :) It's my first patch so please don't kill me Bye

You patch is reverted and I don't think it will cut it, since I tries this myself and it didn't work out.

BTW>. Anybody out there who managed to make SCSI gogin on 2.5.1-pre2... I only have PPA ZIP and IDE-SCSI at my home machine, and both fail with a bad pointer derefference...

#3 lore raw
In reply to Sebastian Dröge
Quoted 5 lines · Slo Mo Snail

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think the patch doesn't work :(
When I try to mount a CD over SCSI emulation I get this nice oops:

Please try this patch, ide-scsi is over writing the io veclist (longer
story: the io_vec_list used to be embedded so memset'ing the bio would be ok).

BTW, this could be handled smarter with the new scheme -- no need to link the bio, more segments can be crammed into just one. Someone playing around with making ide-scsi faster can do that though, I'm just making it work :-)

kernel.org/pub/linux/kernel/people/axboe/patches/v2.5/2.5.1-pre2/bio-pre2-2

Signature · 1 line
Jens Axboe