lkml.org 
[lkml]   [2000]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: packet-0.0.1j & scsi
On Sun, Feb 20 2000, Gregory Zornetzer wrote:
> Hi all,
>
> I just tried to make a patch based on packet-0.0.1j for linux-2.3.47pre7.
> For the most part, things were very easy, and only a few parts had to be
> manually applied (the only part that I couldn't figure out was the sparc32
> compatibility bit - looks like DaveM did a sparc merge). I think that the
> patch to sr.c for 2.3.46 has a bug, though. The following bit seems wrong
> in sr.c:
>
> @@ -322,12 +325,17 @@
> }
> }
> switch (SCpnt->request.cmd) {
> - case WRITE:
> + case WRITE_PACKET:
> + printk("sr: got WRITE_PACKET\n");
> + SCpnt->cmnd[0] = WRITE_10;
> + break;
> + case WRITE: {
> + printk("sr: got WRITE\n");
> if (!scsi_CDs[dev].device->writeable) {
> return 0;
> }
> SCpnt->cmnd[0] = WRITE_10;
> - break;
> + }
> case READ:
> SCpnt->cmnd[0] = READ_10;
> break;
>
>
> I don't see why you need the braces after 'case WRITE:', but that's a bit
> smaller than the problem of not having a 'break' at the end of 'case
> WRITE:'

The reason for the braces was because I had a variable declaration
in there at some point that later got removed. And the missing break
is just a stupid over sight...

For sparc64 just declare the three packet ioctls compatible, ala:

COMPATIBLE_IOCTL(PACKET_SETUP_DEV);

etc.

> Comments? I haven't compiled the kernel yet, so I'll see what happens.

Thanks for informing me, I'll see if I have time to do a 2.3.47 patch
before leaving (hold on to you bug reports until March 1st!).

> Thanks for working on packet-writing, Jens.

Can't let Windows have the edge on that ;)

--
* Jens Axboe <axboe@suse.de>
* Linux CD-ROM Maintainer
* http://www.kernel.dk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean