From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Date: Wed, 15 Jun 2011 07:13:55 +0000 Subject: Re: udev queue error Message-Id: <20110615071355.GJ8141@htj.dyndns.org> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hello, Kay. Looks good to me. Just some nitpicks. On Tue, Jun 14, 2011 at 10:24:16PM +0200, Kay Sievers wrote: > - if (last_present != cd->media_present) > + if (last_present != cd->media_present) { > events |= DISK_EVENT_MEDIA_CHANGE; > + } else if (events & DISK_EVENT_MEDIA_CHANGE) { > + cd->tur_mismatch++; > + printk("sr: GET_EVENT_STATUS_NOTIFICATION but TUR unchanged, " > + "last_present %i <-> cd->media_present %i, count %i\n", last_present, cd->media_present, cd->tur_mismatch); I suppose the above printk is for debugging and will be removed when posting for inclusion? > + if (cd->tur_mismatch > 8) { > + printk("sr: GET_EVENT_STATUS_NOTIFICATION but TUR unchanged, " > + "ignoring all future GET_EVENT_STATUS_NOTIFICATION\n"); > + cd->ignore_get_event = true; sdev_printk(KERN_WARNING, ...) would probably be a better fit. > + } > + } else if (cd->tur_mismatch) { > + printk("sr: GET_EVENT_STATUS_NOTIFICATION = TUR, " > + "clear mismatch count %i\n", cd->tur_mismatch); > + cd->tur_mismatch = 0; Ditto, we probably don't want the above in the final version. Thank you. -- tejun