• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/usb/storage/

Lines Matching refs:pba

51 #define PBA_LO(pba) ((pba & 0xF) << 5)
52 #define PBA_HI(pba) (pba >> 3)
53 #define PBA_ZONE(pba) (pba >> 11)
414 static int alauda_get_redu_data(struct us_data *us, u16 pba, unsigned char *data)
419 PBA_HI(pba), PBA_ZONE(pba), 0, PBA_LO(pba), 0, 0, MEDIA_PORT(us)
450 * Produces lba <--> pba mappings
583 static int alauda_erase_block(struct us_data *us, u16 pba)
587 ALAUDA_BULK_CMD, ALAUDA_BULK_ERASE_BLOCK, PBA_HI(pba),
588 PBA_ZONE(pba), 0, PBA_LO(pba), 0x02, 0, MEDIA_PORT(us)
592 US_DEBUGP("alauda_erase_block: Erasing PBA %d\n", pba);
613 static int alauda_read_block_raw(struct us_data *us, u16 pba,
618 ALAUDA_BULK_CMD, ALAUDA_BULK_READ_BLOCK, PBA_HI(pba),
619 PBA_ZONE(pba), 0, PBA_LO(pba) + page, pages, 0, MEDIA_PORT(us)
622 US_DEBUGP("alauda_read_block: pba %d page %d count %d\n",
623 pba, page, pages);
640 static int alauda_read_block(struct us_data *us, u16 pba,
646 rc = alauda_read_block_raw(us, pba, page, pages, data);
665 static int alauda_write_block(struct us_data *us, u16 pba, unsigned char *data)
670 ALAUDA_BULK_CMD, ALAUDA_BULK_WRITE_BLOCK, PBA_HI(pba),
671 PBA_ZONE(pba), 0, PBA_LO(pba), 32, 0, MEDIA_PORT(us)
674 US_DEBUGP("alauda_write_block: pba %d\n", pba);
697 u16 pba, lbap, new_pba;
711 pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset];
712 if (pba == 1) {
715 printk("alauda_write_lba: avoid writing to pba 1\n");
726 if (pba != UNDEF) {
727 result = alauda_read_block_raw(us, pba, 0,
745 US_DEBUGP("Warning: bad ecc in page %d- of pba %d\n",
746 i, pba);
751 US_DEBUGP("Warning: bad ecc in page %d+ of pba %d\n",
752 i, pba);
782 if (pba != UNDEF) {
783 unsigned int pba_offset = pba - (zone * zonesize);
784 result = alauda_erase_block(us, pba);
836 u16 pba;
852 pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset];
854 if (pba == UNDEF) { /* this lba was never written */
867 pages, pba, lba, page);
869 result = alauda_read_block(us, pba, page, pages, buffer);