Lines Matching refs:wd
281 printf("wd%d: error %x\n", chp->compatchan,
293 wdccommandext(struct wd_softc *wd, struct wdc_command *wd_c)
295 struct wdc_channel *chp = &wd->sc_channel;
327 printf("wd%d: error %x\n", chp->compatchan,
339 wdc_exec_identify(struct wd_softc *wd, void *data)
351 if ((error = wdccommand(wd, &wd_c)) != 0)
354 return wdc_read_block(wd, &wd_c);
361 wdc_exec_read(struct wd_softc *wd, uint8_t cmd, daddr_t blkno, void *data)
375 wd_c.bcount = wd->sc_label.d_secsize;
377 if ((wd->sc_flags & WDF_LBA48) != 0 && blkno > wd->sc_capacity28)
379 else if ((wd->sc_flags & WDF_LBA) != 0)
396 wd_c.r_sector = blkno % wd->sc_label.d_nsectors;
398 blkno /= wd->sc_label.d_nsectors;
399 wd_c.r_head = blkno % wd->sc_label.d_ntracks;
400 blkno /= wd->sc_label.d_ntracks;
406 error = wdccommandext(wd, &wd_c);
408 error = wdccommand(wd, &wd_c);
413 return wdc_read_block(wd, &wd_c);