All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dominic Driver <dominic.driver@paragon.co.nz>
To: linux-scsi@vger.kernel.org
Subject: SCSI Driver Regression and Missing Code Block?
Date: Wed, 22 Apr 2009 12:50:06 +1200 (NZST)	[thread overview]
Message-ID: <5313655.7301240361406269.JavaMail.root@mail.paragon.co.nz> (raw)
In-Reply-To: <30274704.7281240360796458.JavaMail.root@mail.paragon.co.nz>

Hi Guys,

I had an interesting experience with my SATA DVD-RW Drives following a Kernel Upgrade from:

2.6.27.19-170.2.35.fc10.i686
to 
2.6.28.6 (Vanilla)

I had been previously using a Fedora 10 release, but required the 2.6.28 kernel in order to update the driver for my onboard Intel Graphics chip (apparently some modules required for this process had been moved into the kernel from 27->28). This was required to fix an issue which was preventing correct functionality of a C++ application I'm working on. This C++ application also has a heavy bias on DVD-ROM burning, and this is where my two problems lie.

Rebuilding went smoothly, and the 2.6.28.6 kernel ran as expected in all but 2 areas:
1) When reading from the disc in a DVD-RW Drive, The return values of the IOCTL Call CDROM_DRIVE_STATUS were not the same as the previous kernel values.

2) Maximum burning speed of the drive seems to be very slow; averaging 2.2X instead of the previous 10+X.

I rooted around in the source code to fix issue 1), and found the following code was completely omitted from the function

int sr_drive_status(struct cdrom_device_info *cdi, int slot)

in the file 

sr_ioctl.c:

	/* SK/ASC/ASCQ of 2/4/1 means "unit is becoming ready" */
	if (scsi_sense_valid(&sshdr) && sshdr.sense_key == NOT_READY
			&& sshdr.asc == 0x04 && sshdr.ascq == 0x01)
		return CDS_DRIVE_NOT_READY;

My Question is: Is this an intentional change, or an accidental omission? It's pretty weird to have a whole chunk like that missing from a function without a comment. I've had to manually replace this bit of code to regain the functionality I had in the 2.6.27 kernel. This is the only change I had to make, which is even stranger. How come it's different in 2.6.28.6?



Regarding issue 2) - I haven't found a solution to this yet. I've used various tools to check the speed of the drive, and it's set at maximum 16.4X. Using Growisofs to burn the DVDs also displays that the application is attempting to burn at 16.4X, but in reality it only averages 2.2X. This is a major issue for my application, as burn times are absolutely critical. 

If I boot my Linux machine using the previous kernel (2.6.27...) I get the maximum burn speeds back. Something has definitely changed in upgrading kernels. I even used the 2.6.27 config file when building the 2.6.28 kernel, so I know all the settings are the same. 

Have there been any fundamental changes in the SCSI driver from 2.6.27-19 to 2.6.28.6? how can I get my top burn speeds back?

Thanks in advance for any help or pointers you can give me. I've trawled the net, but the only posts I have found are for IDE drives, and the top solution is to fiddle with uDMA settings - obviously not an option here.

Best regards,
-- 
Dominic Driver
Engineer
Paragon Electronic Design Limited
Level 2 21-23 Andrews Avenue
ANZ House
PO Box 30-449, Lower Hutt
New Zealand

Direct: +64 4 5703892
Fax: +64 4 5703 871
mailto:dominic.driver@paragon.co.nz
http://www.paragon.co.nz


       reply	other threads:[~2009-04-22  1:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <30274704.7281240360796458.JavaMail.root@mail.paragon.co.nz>
2009-04-22  0:50 ` Dominic Driver [this message]
2009-04-22  2:09   ` SCSI Driver Regression and Missing Code Block? Matthew Wilcox
     [not found] <9573387.7901240380756993.JavaMail.root@mail.paragon.co.nz>
     [not found] ` <7297889.7921240382112001.JavaMail.root@mail.paragon.co.nz>
2009-04-22 11:52   ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5313655.7301240361406269.JavaMail.root@mail.paragon.co.nz \
    --to=dominic.driver@paragon.co.nz \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.