Re: [PATCH 03/18] ide-cd: cdrom_decode_status: factor out block pc error handling code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bartlomiej Zolnierkiewicz
Date: Saturday, June 14, 2008 - 10:29 am

On Thursday 12 June 2008, Borislav Petkov wrote:

I actually think that we should try to unite pc/fs error handling as much
as possible as it shouldn't really matter if i.e. READ command came through
fs or pc request - the error handling w.r.t. hardware should be the same
(at the moment it is not always the case - the most blatant example of this
disrepancy is handling of NOT_READY sense key for WRITE commands).

When I was suggesting factoring out error handling I rather meant moving
out _everything_ after OK_STAT() (sorry for the confusion).  On the second
thought we may do it in even simpler way by moving:

...
	/* check for errors */
	stat = ide_read_status(drive);

	if (stat_ret)
		*stat_ret = stat;

	if (OK_STAT(stat, good_stat, BAD_R_STAT))
		return 0;
...

to cdrom_decode_status() users and passing as an argument 'stat' instead
of 'good_stat' and 'stat_ret'.

Therefore I skipped this patch (and also patch #4) for now.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/18] misc generic ide stuff, Borislav Petkov, (Wed Jun 11, 11:40 pm)
[PATCH 01/18] ide-cd: remove wait-for-idle-controller bit ..., Borislav Petkov, (Wed Jun 11, 11:40 pm)
[PATCH 07/18] ide-cd: mv ide_do_rw_cdrom ide_cd_do_request, Borislav Petkov, (Wed Jun 11, 11:40 pm)
[PATCH 08/18] ide-cd: simplify request issuing path, Borislav Petkov, (Wed Jun 11, 11:41 pm)
[PATCH 13/18] ide-floppy: replace pc->c with rq->cmd, Borislav Petkov, (Wed Jun 11, 11:41 pm)
[PATCH 17/18] ide-floppy: cleanup idefloppy_create_rw_cmd, Borislav Petkov, (Wed Jun 11, 11:41 pm)
[PATCH 18/18] ide: use flags in IRQ handler, Borislav Petkov, (Wed Jun 11, 11:41 pm)
Re: [PATCH 00/18] misc generic ide stuff, Bartlomiej Zolnierki ..., (Sat Jun 14, 10:29 am)
Re: [PATCH 02/18] ide-cd: remove ide_cd_drain_data and ide ..., Bartlomiej Zolnierki ..., (Sat Jun 14, 10:29 am)
Re: [PATCH 03/18] ide-cd: cdrom_decode_status: factor out ..., Bartlomiej Zolnierki ..., (Sat Jun 14, 10:29 am)
Re: [PATCH 13/18] ide-floppy: replace pc->c with rq->cmd, Bartlomiej Zolnierki ..., (Sat Jun 14, 10:40 am)
Re: [PATCH 18/18] ide: use flags in IRQ handler, Bartlomiej Zolnierki ..., (Sat Jun 14, 10:47 am)
Re: [PATCH 00/18] misc generic ide stuff, Borislav Petkov, (Sun Jun 15, 3:27 am)
Re: [PATCH 13/18] ide-floppy: replace pc->c with rq->cmd, Bartlomiej Zolnierki ..., (Sun Jun 15, 7:57 am)
Re: [PATCH 03/18] ide-cd: cdrom_decode_status: factor out ..., Borislav Petkov, (Fri Aug 15, 12:34 am)
Re: [PATCH 03/18] ide-cd: cdrom_decode_status: factor out ..., Borislav Petkov, (Fri Aug 15, 12:34 am)