mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
NTB bug fixes for tasklet from spinning forever, link errors,
translation window setup, NULL ptr dereference, and ntb-perf errors. Also, a modification to the driver API that makes _addr functions optional. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJW9rVgAAoJEG5mS6x6i9IjutEP/11ufWLOGHOOD4zAZ/Bb62MS YQXr0I/CUViEiV0Jaj254FmlYYafDAb5LfYVneVGalW3HvLMED069M7WEQyP7UqG 4dTNWyktS6GkjrlejGzY2xrPXr8hG4GTrpkMgBo4uZol1n95VEe3IlOn4VheEwPz +RNioK1oBDV6f6JXjD5IH0FP+/Gn1VwxVPq/lXpFIZfw4FX1+pbTfjbNB2kkNOXM 0adUEZdyritg3cqrecH1P+ewGYT5//S/ai/AgxghddJAwh2IHlf46ZdGiVH37Awd r6+EgqzdPiG5Qxlo2CTnu1gb4zsqXJYViWsM+vNIqJYCweD7ZoMuYy89mAf+l0kb a4kBi657qmEsalw4nqeMoZHuHdW2G9gA8UHmNyENRWmtHG7odVXGnR4PA0nE7kyw JPrNSHQ7mGgo+9wsvLYT6BAatpAjBIhE2wjrR8svS8qnP8jU9mjT3nTKAWKl1XO+ YXbUwlqbiMaFzBNd327iyEBqoGU3j1ba+AiG3IBbiOxNJz1WnfFNvnuYMu4zuruZ KmdZlQTO5s2YPBIV+BgzPK6oRBCTxQrVBsRN2jn/i+02gAgB3uZeT3IhLCTLZhtf mT5/3yyvk6O8Hcs5VoSzyyzbAHIL0y/NEUR0jnOqZowwTx8ajg+owHAUgggUloHj wXALu1jc80GsOglBKU0Z =7DcD -----END PGP SIGNATURE----- Merge tag 'ntb-4.6' of git://github.com/jonmason/ntb Pull NTB bug fixes from Jon Mason: "NTB bug fixes for tasklet from spinning forever, link errors, translation window setup, NULL ptr dereference, and ntb-perf errors. Also, a modification to the driver API that makes _addr functions optional" * tag 'ntb-4.6' of git://github.com/jonmason/ntb: NTB: Remove _addr functions from ntb_hw_amd NTB: Make _addr functions optional in the API NTB: Fix incorrect clean up routine in ntb_perf NTB: Fix incorrect return check in ntb_perf ntb: fix possible NULL dereference ntb: add missing setup of translation window ntb: stop link work when we do not have memory ntb: stop tasklet from spinning forever during shutdown. ntb: perf test: fix address space confusion
This commit is contained in:
commit
b4cec5f668
4 changed files with 79 additions and 70 deletions
|
|
@ -284,7 +284,7 @@ static inline int ntb_dev_ops_is_valid(const struct ntb_dev_ops *ops)
|
|||
/* ops->db_read_mask && */
|
||||
ops->db_set_mask &&
|
||||
ops->db_clear_mask &&
|
||||
ops->peer_db_addr &&
|
||||
/* ops->peer_db_addr && */
|
||||
/* ops->peer_db_read && */
|
||||
ops->peer_db_set &&
|
||||
/* ops->peer_db_clear && */
|
||||
|
|
@ -295,7 +295,7 @@ static inline int ntb_dev_ops_is_valid(const struct ntb_dev_ops *ops)
|
|||
ops->spad_count &&
|
||||
ops->spad_read &&
|
||||
ops->spad_write &&
|
||||
ops->peer_spad_addr &&
|
||||
/* ops->peer_spad_addr && */
|
||||
/* ops->peer_spad_read && */
|
||||
ops->peer_spad_write &&
|
||||
1;
|
||||
|
|
@ -757,6 +757,9 @@ static inline int ntb_peer_db_addr(struct ntb_dev *ntb,
|
|||
phys_addr_t *db_addr,
|
||||
resource_size_t *db_size)
|
||||
{
|
||||
if (!ntb->ops->peer_db_addr)
|
||||
return -EINVAL;
|
||||
|
||||
return ntb->ops->peer_db_addr(ntb, db_addr, db_size);
|
||||
}
|
||||
|
||||
|
|
@ -948,6 +951,9 @@ static inline int ntb_spad_write(struct ntb_dev *ntb, int idx, u32 val)
|
|||
static inline int ntb_peer_spad_addr(struct ntb_dev *ntb, int idx,
|
||||
phys_addr_t *spad_addr)
|
||||
{
|
||||
if (!ntb->ops->peer_spad_addr)
|
||||
return -EINVAL;
|
||||
|
||||
return ntb->ops->peer_spad_addr(ntb, idx, spad_addr);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue