[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [address@hidden: Interface for SCSI transactions ?]

From: Samuel Thibault
Subject: Re: [address@hidden: Interface for SCSI transactions ?]
Date: Fri, 13 May 2011 22:42:09 +0200
User-agent: Mutt/1.5.12-2006-07-14

Thomas Schmitt, le Mon 09 May 2011 12:57:21 +0200, a écrit :
> A potential problem is that scsi_ioctl_send_command() is restricted
> to transfer MAX_BUF = PAGE_SIZE payload bytes.
> I could not spot the definition of PAGE_SIZE yet.

Page size on i386 is 4KiB.

> In scsi_ioctl.c:scsi_ioctl_send_command i read:
>      * We do not transfer more than MAX_BUF with this interface.
>      * If the user needs to transfer more data than this, they
>      * should use scsi_generics instead.
> I am unable to determine whether this limit also applies to scsi_do_cmd()
> in hurd/gnumach/linux/src/drivers/scsi/scsi.c  which seems to do the
> transaction work.

It seems to be only 24bit limited.

> Is there a limit for the number of integers with device_get_status() ?

The range of natural_t, I believe. 

> (I'd need at least 32 kiB payload plus about 1 kB of other stuff.
>  Better would be 65 kiB.)

Thus much more than this.

> -antrik- <olafBuddenhagen@gmx.net>:
> > I'm certainly willing to mentor
> > you on the Hurd-specific aspects as well as I can; but I won't promise
> > anything more...
> A sketch how to set up an own Hurd development with access to a
> real CD drive and remote login via real Ethernet would be very welcome.
> Just enough detail to estimate the effort.

You will need an old ethernet device, in order to get it working with
gnumach. Apart from that, it's as simple as installing Debian: just take
the installation CD from the Debian GNU/Hurd website.

> If PAGE_SIZE is not a show stopper, then one could attach 
>   scsi_ioctl(SCSI_IOCTL_SEND_COMMAND, ...)
> from
>   gnumach/linux/src/drivers/scsi/scsi_ioctl.c
> to the kernel side of device_get_status().
> I understand from the comments in scsi_ioctl.c that this is a predecessor
> of the Linux SG_IO interface (Linux kernel >= 2.4).

That's what I understand too.  I actually belive we can try to increase
MAX_BUF.  PAGE_SIZE looks like an arbitrary limit here.  The userland
buffer is allowed to cross page boundaries already, so I don't see what
could break when increasing MAX_BUF.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]