• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/usb/storage/

Lines Matching refs:pba

126 #define PBA_LO(pba) ((pba & 0xF) << 5)
127 #define PBA_HI(pba) (pba >> 3)
128 #define PBA_ZONE(pba) (pba >> 11)
532 static int alauda_get_redu_data(struct us_data *us, u16 pba, unsigned char *data)
537 PBA_HI(pba), PBA_ZONE(pba), 0, PBA_LO(pba), 0, 0, MEDIA_PORT(us)
568 * Produces lba <--> pba mappings
705 static int alauda_erase_block(struct us_data *us, u16 pba)
709 ALAUDA_BULK_CMD, ALAUDA_BULK_ERASE_BLOCK, PBA_HI(pba),
710 PBA_ZONE(pba), 0, PBA_LO(pba), 0x02, 0, MEDIA_PORT(us)
714 US_DEBUGP("alauda_erase_block: Erasing PBA %d\n", pba);
735 static int alauda_read_block_raw(struct us_data *us, u16 pba,
740 ALAUDA_BULK_CMD, ALAUDA_BULK_READ_BLOCK, PBA_HI(pba),
741 PBA_ZONE(pba), 0, PBA_LO(pba) + page, pages, 0, MEDIA_PORT(us)
744 US_DEBUGP("alauda_read_block: pba %d page %d count %d\n",
745 pba, page, pages);
762 static int alauda_read_block(struct us_data *us, u16 pba,
768 rc = alauda_read_block_raw(us, pba, page, pages, data);
787 static int alauda_write_block(struct us_data *us, u16 pba, unsigned char *data)
792 ALAUDA_BULK_CMD, ALAUDA_BULK_WRITE_BLOCK, PBA_HI(pba),
793 PBA_ZONE(pba), 0, PBA_LO(pba), 32, 0, MEDIA_PORT(us)
796 US_DEBUGP("alauda_write_block: pba %d\n", pba);
819 u16 pba, lbap, new_pba;
833 pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset];
834 if (pba == 1) {
838 "alauda_write_lba: avoid writing to pba 1\n");
850 if (pba != UNDEF) {
851 result = alauda_read_block_raw(us, pba, 0,
869 US_DEBUGP("Warning: bad ecc in page %d- of pba %d\n",
870 i, pba);
875 US_DEBUGP("Warning: bad ecc in page %d+ of pba %d\n",
876 i, pba);
906 if (pba != UNDEF) {
907 unsigned int pba_offset = pba - (zone * zonesize);
908 result = alauda_erase_block(us, pba);
962 u16 pba;
978 pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset];
980 if (pba == UNDEF) { /* this lba was never written */
993 pages, pba, lba, page);
995 result = alauda_read_block(us, pba, page, pages, buffer);