An error occurred fetching the project authors.
- 19 Oct, 2004 3 commits
-
-
Peter Osterlund authored
The problem is that some drives fail the "GET CONFIGURATION" command when asked to only return 8 bytes. This happens for example on my drive, which is identified as: hdc: HL-DT-ST DVD+RW GCA-4040N, ATAPI CD/DVD-ROM drive Since the cdrom_mmc3_profile() function already allocates 32 bytes for the reply buffer, this patch is enough to make the command succeed on my drive. Signed-off-by:
Peter Osterlund <petero2@telia.com> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
Peter Osterlund authored
Nigel pointed out that the earlier patches contained attributions that are not present in this patch. The 2.4 patch contains: Nov 5 2001, Aug 8 2002. Modified by Andy Polyakov <appro@fy.chalmers.se> to support MMC-3 complaint DVD+RW units. and Nigel changed it to this in his 2.6 patch: Modified by Nigel Kukard <nkukard@lbsd.net> - support DVD+RW 2.4.x patch by Andy Polyakov <appro@fy.chalmers.se> The patch I sent you deleted most of the earlier work and moved the rest to cdrom.c, but the comments were not moved over, since the earlier authors didn't modify cdrom.c. Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
Peter Osterlund authored
This patch adds support for using DVD+RW drives as writable block devices. The patch is based on work from: Andy Polyakov <appro@fy.chalmers.se> - Wrote the 2.4 patch Nigel Kukard <nkukard@lbsd.net> - Initial porting to 2.6.x It works for me using an Iomega Super DVD 8x USB drive. Nov 5 2001, Aug 8 2002. Modified by Andy Polyakov <appro@fy.chalmers.se> to support MMC-3 complaint DVD+RW units. Modified by Nigel Kukard <nkukard@lbsd.net> - support DVD+RW 2.4.x patch by Andy Polyakov <appro@fy.chalmers.se> This patch implements CDRW packet writing as a kernel block device. Usage instructions are in the packet-writing.txt file. A hint: If you don't want to wait for a complete disc format, you can format just a part of the disc. For example: cdrwtool -d /dev/hdc -m 10240 This will format 10240 blocks, ie 20MB. Signed-off-by:
Peter Osterlund <petero2@telia.com> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 08 Oct, 2004 1 commit
-
-
Jens Axboe authored
Add dummy ->generic_packet() for devices that don't provide one. It will error all commands with "unknown opcode" 0x05/0x20/0x00 sense and return -EIO. Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 14 Sep, 2004 1 commit
-
-
Jesper Juhl authored
akpm: really, reads are supposed to return the number-of-bytes-read on faults, or -EFAULT of no bytes were read. This patch returns either zero or -EFAULT, ignoring any successfully transferred data. But the user interface (whcih is an ioctl()) was never set up to do that. Signed-off-by:
Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 08 Sep, 2004 1 commit
-
-
Andy Polyakov authored
Fix a few range checks which aren't working right because if (int < sizeof(...)) does the wrong thing if `int' is negative, due to `sizeof' returning unsigned. In addition to comparisons, the patch makes CDROMVOL* ioctl more robust. Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 23 Aug, 2004 2 commits
-
-
Jens Axboe authored
A few fixes related to cdrom media event notification. These are from Alexander Kern <alex.kern@gmx.de> Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
Samuel Thibault authored
There's something wrong in cdrom.c: cdrom_get_last_written() for instance calls cdrom_get_disc_info() and cdrom_get_track_info() to get information about tracks, but these functions don't ensure that all the track_information or disc_information structure is filled: /* (buflen was first set to 8 to get track_information_length field) */ if ((ret = cdo->generic_packet(cdi, &cgc))) return ret; cgc.buflen = be16_to_cpu(ti->track_information_length) + sizeof(ti->track_information_length); if (cgc.buflen > sizeof(track_information)) cgc.buflen = sizeof(track_information); cgc.cmd[8] = cgc.buflen; return cdo->generic_packet(cdi, &cgc); The second test ensures that at least we won't overflow the structure, but nothing ensures that all the structure will be filled. And indeed, we have a drive here that won't fill it all: the returned track_information_length field will be *less than* sizeof(track_information) - sizeof(ti->track_information_length), so that cdrom_get_last_written() reads values that weren't filled in! As a result, we are sometimes unable to read some parts of CDROMs, depending on the uninitialized state of the structure... Here is a patch that adds filling checks: cdrom_get_disc_info() and cdrom_get_track_info() return the actual filled length, and it's up to the caller to check that this is enough for him to get the values it wants. Note: adding something like a #define spanof(TYPE, MEMBER) ((size_t) ((&((TYPE *)0)->MEMBER)+1)) definition just near that of offsetof() in include/linux/stddef.h would make it more pretty, but still it won't help for bitfields :/ Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 13 Aug, 2004 1 commit
-
-
Stefan Meyknecht authored
This trivial fix allows mounting MO-drives readwrite. Acked by Jens. Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 12 Aug, 2004 1 commit
-
-
Linus Torvalds authored
They'll need it for permission checking.
-
- 07 Aug, 2004 1 commit
-
-
Linus Torvalds authored
Nobody ever fixed the big FIXME in sysctl - but we really need to pass around the proper "loff_t *" to all the sysctl functions if we want them to be well-behaved wrt the file pointer position. This is all preparation for making direct f_pos accesses go away.
-
- 02 Aug, 2004 2 commits
-
-
Jens Axboe authored
blk_rq_map_user() is a bit of a hack currently, since it drops back to kmalloc() if bio_map_user() fails. This is unfortunate since it means we do no real segment or size checking (and the request segment counts contain crap, already found one bug in a scsi lld). It's also pretty nasty for > PAGE_SIZE requests, as we attempt to do higher order page allocations. Even worse still, ide-cd will drop back to PIO for non-sg/bio requests. All in all, very suboptimal. This patch adds bio_copy_user() which simply sets up a bio with kernel pages and copies data as needed for reads and writes. It also changes bio_map_user() to return an error pointer like bio_copy_user(), so we can return something sane to the user instead of always -ENOMEM. Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
Jens Axboe authored
There's a stupid error in the fall back logic, it fails to increment the user pointer so the wave file is corrupt. We should also clear last_sense just to be sure. Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 28 Jul, 2004 1 commit
-
-
Jens Axboe authored
Hopefully fixes the free-of-a-freed-page BUG caused during CDRW writing. This also fixes a problem in the bouncing for io errors (it needs to free the pages and clear the BIO_UPTODATE flag, not set it. it's already set. passing -EIO to bio_endio() takes care of that). Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 16 Jul, 2004 1 commit
-
-
Pat LaVarre authored
Writing to RAM capable media was broken by the moving of write flag detection from probe to drive open time. The media would stay terminally RO due to the set_disk_ro() call. This fixes the code to do the right thing - the detection stays at open time (which it must, since it depends on the media), and we fail with -EROFS if the media can't be written. Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 01 Jul, 2004 1 commit
-
-
Peter Osterlund authored
Opening a CDROM device for writing no longer works, because cdrom_open() returns -EROFS even if cdrom_open_write() succeeds. This fixes it. Signed-off-by:
Peter Osterlund <petero2@telia.com> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 24 Jun, 2004 1 commit
-
-
Alexander Viro authored
DVD_LU_SEND_{AGID,TITLE_KEY} can be legitimately rejected; in that case we should not spew into logs.
-
- 18 Jun, 2004 1 commit
-
-
Jens Axboe authored
Mt rainier probe must be deferred to media load time, since it requires a valid media (the drive may present a different capability based on what media is loaded). This fixes that for ide-cd and sr. Signed-Off-By:
Jens Axboe <axboe@suse.de> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 09 Jun, 2004 1 commit
-
-
Andrew Morton authored
From: Jens Axboe <axboe@suse.de> cdrom_has_defect_mgt() has the same ->data_len bug - the length field is not total length, but the length following that field. So it should be + 4, not + 8. However, just kill the length check. Comparison of feature_code provides enough check. Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 05 Jun, 2004 1 commit
-
-
Jens Axboe authored
There's a bad length check in cdrom_get_random_writable(), it's off-by-4 since fh->data_len is the length of data _after_ that field (which is offset 4 bytes in the header). Check is pretty bogus anyways, so just kill it. Signed-Off-By:
Jens Axboe <axboe@suse.de> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 29 May, 2004 3 commits
-
-
Alexander Viro authored
scsi_cmd_ioctl() switched to __user *, block/scsi_ioctl.c annotated.
-
Alexander Viro authored
-
Alexander Viro authored
The kernel instance (packet_command) has kernel pointers, userland one - __user ones. Surprise.
-
- 27 Apr, 2004 1 commit
-
-
Jens Axboe authored
We cannot always rely on ->biotail remaining untouched. Currently we leak all the pinned user pages when doing cdda ripping at least, so I see no way around keeping the bio pointer seperate and passing it back in for unmap. Alternatively, we could invent a struct blk_map_data and put it on the stack for passing to both map and unmap.
-
- 25 Mar, 2004 1 commit
-
-
Andrew Morton authored
From: Jens Axboe <axboe@suse.de> If the drive doesn't support GPCMD_READ_DISC_INFO at all, permit writeable opens.
-
- 15 Mar, 2004 1 commit
-
-
Jens Axboe authored
This patch is from Iomega, and it allows random write opens of CDROM's that support the feature.
-
- 11 Mar, 2004 1 commit
-
-
Jens Axboe authored
This small patch builds on top of the blk_rq_map_user() patch just sent, and enables us to easily support DMA for CDROMREADAUDIO cdda extraction. It's quite amazing how much cool stuff you can with the new block layer :-) Patch has intelligent fall back from multi frame dma to single frame dma, and further to old-style pio ripping in case of hardware problems.
-
- 10 Feb, 2004 1 commit
-
-
Jens Axboe authored
From John McKell <mckellj@iomega.com>: This patch for scsi/sr.c and cdrom/cdrom.c persuades /proc/sys/dev/cdrom/info to report that connecting a drive via USB rather than ATAPI in fact does not make it able to write DVD-R. Without this patch, when sr0 and hdd are the same type of device connected via USB and ATAPI respectively, I see: $ cat /proc/sys/dev/cdrom/info: drive name: sr1 sr0 hdd ... Can write CD-R: 1 0 0 Can write CD-RW: 1 0 0 Can read DVD: 0 0 0 Can write DVD-R: 1 1 0 Can write DVD-RAM: 0 0 0 Can read MRW: 0 0 0 Can write MRW: 0 0 0 With this patch applied, instead I see: $ cat /proc/sys/dev/cdrom/info: drive name: sr1 sr0 hdd ... Can write CD-R: 1 0 0 Can write CD-RW: 1 0 0 Can read DVD: 0 0 0 Can write DVD-R: 0 0 0 Can write DVD-RAM: 0 0 0 Can read MRW: 0 0 0 Can write MRW: 0 0 0 The sr1 device in particular is an ordinary CD-RW that in fact cannot write DVD-R. While messing with this code, I also thought to tweak the /proc formatting to align the tabbed columns.
-
- 04 Feb, 2004 2 commits
-
-
Andrew Morton authored
From: Jens Axboe <axboe@suse.de> 2.6 imposes a 64 frame limit where 2.4 does not (just relies on kmalloc() failing and limiting frames from that). That breaks at least on guys app. With MSF adressing, it's much simpler to be able to ask for a full second at the time, so I think we should just allow that. So bump the limit from 64 to CD_FRAMES (which is 75).
-
Andrew Morton authored
From: Jens Axboe <axboe@suse.de> It's from Pascal Schmidt and adds write protect handling to ide-cd along with support for non-2kb block sizes.
-
- 02 Feb, 2004 1 commit
-
-
Patrick Mansfield authored
This patch against a recent bk 2.6 changes scsi_cmd_ioctl to take a gendisk as an argument instead of a request_queue_t. This allows scsi char devices to use the scsi_cmd_ioctl interface. In turn, change bio_map_user to also pass a request_queue_t, and add a __bio_add_page helper that takes a request_queue_t. Tested ide cd burning with no problems. If the scsi upper level scsi_cmd_ioctl usage were consolidated in scsi_prep_fn, we could pass a request_queue_t instead of a gendisk to scsi_cmd_ioctl.
-
- 23 Jan, 2004 1 commit
-
-
Jens Axboe authored
A debug printk was left in there by mistake, it'll get printed for every non-mrw drive. So kill it.
-
- 19 Jan, 2004 3 commits
-
-
Andrew Morton authored
From: Jens Axboe <axboe@suse.de> Update the ATAPI MO support code to reflect the reorganisations and cleanups which the Mt Ranier support patch added. DESC cdrom_open fix EDESC From: Jens Axboe <axboe@suse.de>
-
Andrew Morton authored
From: Jens Axboe <axboe@suse.de> Following patch adds mt rainier support to the cdrom uniform layer (it works with atapi and scsi/usb).
-
Andrew Morton authored
From: Pascal Schmidt <der.eremit@email.de> The below patch is needed to support ATAPI MO drives in 2.6. ide-scsi doesn't work any more for this, so ide-cd has to take over the job of running the MO drive. Without this, there is no way to write to an ATAPI MO drive. This patch has been discussed with Linus and Jens already around test9 time and it was agreed this is the right way to go about it. I have rediffed it against 2.6.0. Compiles, runs, works just fine for me.
-
- 29 Sep, 2003 1 commit
-
-
Jens Axboe authored
The CDROM_SEND_PACKET ioctl is both slow and ugly, this patch keeps the functionality but utilizes the much better sg_io() framework.
-
- 23 Sep, 2003 1 commit
-
-
Jens Axboe authored
From Szombathelyi György This fixes a memory leak in the uniform cdrom layer.
-
- 06 Sep, 2003 1 commit
-
-
Randy Dunlap authored
From: Daniele <bellucda@tiscali.it> OK-ed by Jens.
-
- 17 Jul, 2003 1 commit
-
-
Peter Osterlund authored
The CDROM_SEND_PACKET ioctl passes a struct cdrom_generic_command from user space, which contains a timeout field. The timeout is measured in jiffies, but the conversion from user to kernel jiffies is missing, which makes the timeout 10 times shorter than it should be in 2.5 kernels on x86. This causes CDRW formatting with cdrwtool to fail. The following patch fixes this problem.
-
- 20 Mar, 2003 1 commit
-
-
Jens Axboe authored
dvd_read_physical() uses a 20 char buffer to read in the dvd structure, however the size is really 4 bytes header + 17 bytes body so layer->bca ends up containing garbage. Kudos to the nice folks who made it a non multiple of 4 bytes.
-