Lines Matching defs:wd
244 printf("wd%d: error %x\n", chp->compatchan,
256 wdccommandext(struct wd_softc *wd, struct wdc_command *wd_c)
258 struct wdc_channel *chp = &wd->sc_channel;
290 printf("wd%d: error %x\n", chp->compatchan,
302 wdc_exec_identify(struct wd_softc *wd, void *data)
309 wd_c.drive = wd->sc_unit;
314 if ((error = wdccommand(wd, &wd_c)) != 0)
317 return wdc_read_block(wd, &wd_c);
324 wdc_exec_read(struct wd_softc *wd, uint8_t cmd, daddr_t blkno, void *data)
337 wd_c.drive = wd->sc_unit;
338 wd_c.bcount = wd->sc_label.d_secsize;
340 if ((wd->sc_flags & WDF_LBA48) != 0 && blkno > wd->sc_capacity28)
342 else if ((wd->sc_flags & WDF_LBA) != 0)
359 wd_c.r_sector = blkno % wd->sc_label.d_nsectors;
361 blkno /= wd->sc_label.d_nsectors;
362 wd_c.r_head = blkno % wd->sc_label.d_ntracks;
363 blkno /= wd->sc_label.d_ntracks;
369 error = wdccommandext(wd, &wd_c);
371 error = wdccommand(wd, &wd_c);
376 return wdc_read_block(wd, &wd_c);