mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
ide-floppy/ide_floppy_get_sfrp_bit: use local buffer
There should be no functional change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
This commit is contained in:
parent
d9a6830764
commit
802e663427
1 changed files with 3 additions and 2 deletions
|
@ -117,16 +117,17 @@ static void ide_floppy_create_format_unit_cmd(struct ide_atapi_pc *pc, int b,
|
||||||
static int ide_floppy_get_sfrp_bit(ide_drive_t *drive, struct ide_atapi_pc *pc)
|
static int ide_floppy_get_sfrp_bit(ide_drive_t *drive, struct ide_atapi_pc *pc)
|
||||||
{
|
{
|
||||||
struct ide_disk_obj *floppy = drive->driver_data;
|
struct ide_disk_obj *floppy = drive->driver_data;
|
||||||
|
u8 buf[20];
|
||||||
|
|
||||||
drive->atapi_flags &= ~IDE_AFLAG_SRFP;
|
drive->atapi_flags &= ~IDE_AFLAG_SRFP;
|
||||||
|
|
||||||
ide_floppy_create_mode_sense_cmd(pc, IDEFLOPPY_CAPABILITIES_PAGE);
|
ide_floppy_create_mode_sense_cmd(pc, IDEFLOPPY_CAPABILITIES_PAGE);
|
||||||
pc->flags |= PC_FLAG_SUPPRESS_ERROR;
|
pc->flags |= PC_FLAG_SUPPRESS_ERROR;
|
||||||
|
|
||||||
if (ide_queue_pc_tail(drive, floppy->disk, pc, pc->buf, pc->req_xfer))
|
if (ide_queue_pc_tail(drive, floppy->disk, pc, buf, pc->req_xfer))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (pc->buf[8 + 2] & 0x40)
|
if (buf[8 + 2] & 0x40)
|
||||||
drive->atapi_flags |= IDE_AFLAG_SRFP;
|
drive->atapi_flags |= IDE_AFLAG_SRFP;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue